Tue, 06 Jan 2015 21:39:09 +0100
Conditionally force memory storage according to privacy.thirdparty.isolate;
This solves Tor bug #9701, complying with disk avoidance documented in
https://www.torproject.org/projects/torbrowser/design/#disk-avoidance.
1 <!DOCTYPE HTML>
2 <html>
3 <head>
4 <title>Media test: seek test 3</title>
5 <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
6 <script type="text/javascript" src="manifest.js"></script>
7 <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
8 </head>
9 <body onunload="mediaTestCleanup();">
10 <pre id="test">
11 <script class="testbody" type="text/javascript">
13 function on_metadataloaded() {
14 var v = document.getElementById('v');
15 ok(range_equals(v.seekable, v.buffered), "seekable.length should be initialy empty, or equal to buffered");
16 v.addEventListener("playing", function() {
17 ok(v.seekable.length > 0, "seekable.length should not be empty while playing.");
18 }, false);
19 v.addEventListener("ended", function() {
20 is(v.seekable.length, 1, "seekable.length should be 1 at end of playback.");
21 is(v.seekable.start(0), 0.0, "start of first range should 0.0");
22 is(v.seekable.end(0), v.duration, "end of first range should be equal to duration");
23 SimpleTest.finish();
24 }, false);
26 v.play();
27 }
29 SimpleTest.waitForExplicitFinish();
30 </script>
31 </pre>
32 <video id='v'
33 preload="metadata"
34 src='contentDuration6.sjs'
35 onloadedmetadata='on_metadataloaded();'></video>
36 </body>
37 </html>