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