Thu, 15 Jan 2015 21:03:48 +0100
Integrate friendly tips from Tor colleagues to make (or not) 4.5 alpha 3;
This includes removal of overloaded (but unused) methods, and addition of
a overlooked call to DataStruct::SetData(nsISupports, uint32_t, bool.)
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 }