tor-browser

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

test_no_load_event.html (1256B)


      1 <!DOCTYPE HTML>
      2 <html>
      3 <!--
      4 https://bugzilla.mozilla.org/show_bug.cgi?id=715469
      5 -->
      6 <head>
      7  <meta charset="utf-8">
      8  <title>Test for Bug 715469</title>
      9  <script src="/tests/SimpleTest/SimpleTest.js"></script>
     10  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
     11  <script type="text/javascript" src="manifest.js"></script>
     12 </head>
     13 <body onload="start();">
     14 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=715469">Mozilla Bug 715469</a>
     15 <p id="display"></p>
     16 <div id="content" style="display: none">
     17 </div>
     18 <pre id="test">
     19 
     20 <script type="application/javascript">
     21 
     22 /** Test for Bug 715469 */
     23 
     24 var gotLoadEvent = false;
     25 
     26 function start() {
     27  var resource = getPlayableVideo(gSmallTests);
     28  if (resource == null) {
     29    todo(false, "No types supported");
     30  } else {
     31    SimpleTest.waitForExplicitFinish();
     32    var v = document.createElement("video");
     33    v.src = resource.name;
     34 
     35    v.addEventListener("load", function() {
     36      gotLoadEvent = true;
     37    });
     38 
     39    v.addEventListener("ended", finished);
     40    document.body.appendChild(v);
     41    v.play();
     42  }
     43 }
     44 
     45 function finished() {
     46  is(gotLoadEvent, false, "Should not receive a load on the video element");
     47  SimpleTest.finish();
     48 }
     49 
     50 </script>
     51 </pre>
     52 </body>
     53 </html>