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 function test_seek7(v, seekTime, is, ok, finish) {
3 // If a NaN is passed to currentTime, make sure this is caught
4 // otherwise an infinite loop in the Ogg backend occurs.
5 var completed = false;
6 var thrown1 = false;
7 var thrown2 = false;
8 var thrown3 = false;
10 function startTest() {
11 if (completed)
12 return;
14 try {
15 v.currentTime = NaN;
16 } catch(e) {
17 thrown1 = true;
18 }
20 try {
21 v.currentTime = Math.random;
22 } catch(e) {
23 thrown3 = true;
24 }
26 completed = true;
27 ok(thrown1, "Setting currentTime to invalid value of NaN");
28 ok(thrown3, "Setting currentTime to invalid value of a function");
29 finish();
30 }
32 v.addEventListener("loadedmetadata", startTest, false);
34 }