docshell/test/navigation/file_bug1379762-1.html
author Byron Campen [:bwc] <docfaraday@gmail.com>
Mon, 29 Apr 2019 15:51:30 +0000
changeset 471964 f8a6a019f873aaebc47740ea1423c0985aaedf69
parent 444992 db6a356eef5952d3365a6b4ec2f454e3293d4b5e
permissions -rw-r--r--
Bug 1531803 - Part 3: Only set track id on JsepTrack if we're configured to emit track ids in SDP, and simplify some code. r=mjf Differential Revision: https://phabricator.services.mozilla.com/D25796

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <title>Bug 1379762</title>
  </head>
  <img srcset> <!-- This tries to add load blockers during bfcache restoration -->
  <script>
    onunload = null; // enable bfcache
    opener.is(opener.testCount, 0,
              "We should only run once; otherwise the loadCount variable makes no sense");
    var loadCount = 0;
    onpageshow = function() {
      ++opener.testCount;
      if (opener.testCount == 1) {
        // Navigate forward and then back.
        // eslint-disable-next-line no-global-assign
        setTimeout(function() { location = "goback.html"; }, 0);
      } else if (opener.testCount == 2) {
        // Do this async so our load event gets a chance to fire if it plans to
        // do it.
        setTimeout(function() {
          opener.nextTest();
          window.close();
        });
      }
    };
    onload = function() {
      ++loadCount;
      opener.is(loadCount, 1, "Should only get one onload");
    };
  </script>
</html>