content/media/test/test_no_load_event.html

Thu, 15 Jan 2015 21:13:52 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 15 Jan 2015 21:13:52 +0100
branch
TOR_BUG_9701
changeset 12
7540298fafa1
permissions
-rw-r--r--

Remove forgotten relic of ABI crash risk averse overloaded method change.

     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 type="application/javascript" 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">
    18 </div>
    19 <pre id="test">
    21 <script type="application/javascript">
    23 /** Test for Bug 715469 **/
    25 var gotLoadEvent = false;
    27 function start() {
    28   var resource = getPlayableVideo(gSmallTests);
    29   if (resource == null) {
    30     todo(false, "No types supported");
    31   } else {
    32     SimpleTest.waitForExplicitFinish();
    33     var v = document.createElement("video");
    34     v.src = resource.name;
    35     v.addEventListener("loadeddata", function(){v.play();}, false);
    36     v.controls = "true";
    38     v.addEventListener("load",
    39       function(){
    40         gotLoadEvent = true;
    41       },
    42       false);
    44     v.addEventListener("ended", finished, false);
    46     document.body.appendChild(v);
    47   }
    48 }
    50 function finished() {
    51   is(gotLoadEvent, false, "Should not receive a load on the video element");
    52   SimpleTest.finish();
    53 }
    56 </script>
    57 </pre>
    58 </body>
    59 </html>

mercurial