2 if (window
.testRunner
) {
3 testRunner
.dumpAsText();
4 testRunner
.dumpStatusCallbacks();
9 document
.getElementById("console").innerHTML
+= "<li>" + s
+ "</li>";
12 function shouldBe(a
, b
)
22 var message
= (evalA
=== evalB
)
23 ? "PASS: " + a
+ " should be '" + evalB
+ "' and is."
24 : "*** FAIL: " + a
+ " should be '" + evalB
+ "' but instead is " + evalA
+ ". ***";
30 shouldBe("window.status = 'set window.status'; window.status", "'set window.status'");
31 shouldBe("status = 'set status'", "'set status'");
32 shouldBe("window.status = 1; window.status", "'1'");
33 shouldBe("status = 2; status", "'2'");
34 shouldBe("window.status={toString:function(){ return 'object.toString'; }}; window.status", "'object.toString'");
37 This tests that we can assign strings to the status property.
38 <ul id=
"console"></ul>