| This page verifies that timers with equivalent fire times fire in the order they |
| were registered. If the test passes, you'll see a series of PASS messages below. |
| document.getElementById("pre").appendChild(document.createTextNode(s + "\n")); |
| function shouldBe(a, aDescription, b) |
| log("PASS: " + aDescription + " should be " + b + " and is."); |
| log("FAIL: " + aDescription + " should be " + b + " but instead is " + a + "."); |
| for (var i = 0; i < count; ++i) |
| shouldBe(firedTimers[i], "firedTimers[" + i + "]", i); |
| testRunner.waitUntilDone(); |
| for (var i = 0; i < count; ++i) |
| setTimeout((function() { var j = i; return function() { fired(j); }})(), 0); |