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
1 function test_seek10(v, seekTime, is, ok, finish) {
3 // Test bug 523335 - ensure that if we close a stream while seeking, we
4 // don't hang during shutdown. This test won't "fail" per se if it's regressed,
5 // it will instead start to cause random hangs in the mochitest harness on
6 // shutdown.
8 function startTest() {
9 // Must be duration*0.9 rather than seekTime, else we don't hit that problem.
10 // This is probably due to the seek bisection finishing too quickly, before
11 // we can close the stream.
12 v.currentTime = v.duration * 0.9;
13 }
15 function done(evt) {
16 ok(true, "We don't acutally test anything...");
17 finish();
18 }
20 function seeking() {
21 ok(v.currentTime >= seekTime - 0.1, "Video currentTime should be around " + seekTime + ": " + v.currentTime);
22 v.onerror = done;
23 v.src = "not a valid video file.";
24 v.load(); // Cause the existing stream to close.
25 }
27 v.addEventListener("loadeddata", startTest, false);
28 v.addEventListener("seeking", seeking, false);
30 }