tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

test_bug1788125.html (1316B)


      1 <!DOCTYPE HTML>
      2 <html>
      3 <head>
      4  <meta charset="utf-8">
      5  <title><!-- TODO: insert title here --></title>
      6  <script src="/tests/SimpleTest/SimpleTest.js"></script>
      7  <link rel="stylesheet" href="/tests/SimpleTest/test.css"/>
      8  <style>
      9  #anim {
     10    width: 100px;
     11    height: 100px;
     12    background: red;
     13    position: relative;
     14    animation: mymove 1s 1;
     15    animation-iteration-count: infinite;
     16  }
     17 
     18  @keyframes mymove {
     19    from {left: 0px;}
     20    to {left: 200px;}
     21  }
     22  </style>
     23  <script>
     24  SimpleTest.waitForExplicitFinish();
     25 
     26  var animCount = 0;
     27  var didRunXHR = false;
     28 
     29  async function start() {
     30    window.addEventListener("animationiteration", function l() {
     31      ++animCount;
     32      info(animCount);
     33      if (didRunXHR) {
     34        window.removeEventListener("animationiteration", l);
     35        document.getElementById("anim").id = "";
     36        SimpleTest.finish();
     37      }
     38    });
     39 
     40    let startCount = animCount;
     41    let xhr = new XMLHttpRequest();
     42    xhr.open("GET", "slow.sjs", false);
     43    xhr.send(null);
     44    didRunXHR = true;
     45    is(animCount, startCount, "Shouldn't have triggered animation events during the sync XHRs");
     46  }
     47 
     48 
     49  </script>
     50 </head>
     51 <body onload="start()">
     52 <div id="anim"></div>
     53 <p id="display"></p>
     54 <div id="content" style="display: none"></div>
     55 <pre id="test"></pre>
     56 </body>
     57 </html>