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 | <head> |
michael@0 | 4 | <title>Media test: seek test 3</title> |
michael@0 | 5 | <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script> |
michael@0 | 6 | <script type="text/javascript" src="manifest.js"></script> |
michael@0 | 7 | <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" /> |
michael@0 | 8 | </head> |
michael@0 | 9 | <body onunload="mediaTestCleanup();"> |
michael@0 | 10 | <pre id="test"> |
michael@0 | 11 | <script class="testbody" type="text/javascript"> |
michael@0 | 12 | |
michael@0 | 13 | function on_metadataloaded() { |
michael@0 | 14 | var v = document.getElementById('v'); |
michael@0 | 15 | ok(range_equals(v.seekable, v.buffered), "seekable.length should be initialy empty"); |
michael@0 | 16 | v.addEventListener("playing", function() { |
michael@0 | 17 | ok(v.seekable.length > 0, "seekable.length should not empty while playing."); |
michael@0 | 18 | }, false); |
michael@0 | 19 | v.addEventListener("ended", function() { |
michael@0 | 20 | is(v.seekable.length, 1, "seekable.length should be 1 at end of playback."); |
michael@0 | 21 | is(v.seekable.start(0), 0.0, "start of first range should 0.0"); |
michael@0 | 22 | is(v.seekable.end(0), v.duration, "end of first range should be equal to duration"); |
michael@0 | 23 | SimpleTest.finish(); |
michael@0 | 24 | }, false); |
michael@0 | 25 | |
michael@0 | 26 | v.play(); |
michael@0 | 27 | } |
michael@0 | 28 | |
michael@0 | 29 | SimpleTest.waitForExplicitFinish(); |
michael@0 | 30 | </script> |
michael@0 | 31 | </pre> |
michael@0 | 32 | <video id='v' |
michael@0 | 33 | src='noContentLength.sjs' |
michael@0 | 34 | onloadedmetadata='on_metadataloaded();'></video> |
michael@0 | 35 | </body> |
michael@0 | 36 | </html> |