2 This page verifies that timers with equivalent fire times fire in the order they
3 were registered. If the test passes, you'll see a series of PASS messages below.
11 document
.getElementById("pre").appendChild(document
.createTextNode(s
+ "\n"));
14 function shouldBe(a
, aDescription
, b
)
17 log("PASS: " + aDescription
+ " should be " + b
+ " and is.");
19 log("FAIL: " + aDescription
+ " should be " + b
+ " but instead is " + a
+ ".");
35 for (var i
= 0; i
< count
; ++i
)
36 shouldBe(firedTimers
[i
], "firedTimers[" + i
+ "]", i
);
38 if (window
.testRunner
)
39 testRunner
.notifyDone();
42 if (window
.testRunner
) {
43 testRunner
.dumpAsText();
44 testRunner
.waitUntilDone();
47 for (var i
= 0; i
< count
; ++i
)
48 setTimeout((function() { var j
= i
; return function() { fired(j
); }})(), 0);