Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / dom / assign-to-window-status.html
blob9b730b79a5426d06329c437cc7669442cbbdc3fc
1 <script>
2 if (window.testRunner) {
3 testRunner.dumpAsText();
4 testRunner.dumpStatusCallbacks();
7 function log(s)
9 document.getElementById("console").innerHTML += "<li>" + s + "</li>";
12 function shouldBe(a, b)
14 var evalA, evalB;
15 try {
16 evalA = eval(a);
17 evalB = eval(b);
18 } catch(e) {
19 evalA = e;
22 var message = (evalA === evalB)
23 ? "PASS: " + a + " should be '" + evalB + "' and is."
24 : "*** FAIL: " + a + " should be '" + evalB + "' but instead is " + evalA + ". ***";
25 log(message);
28 function test()
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'");
36 </script>
37 This tests that we can assign strings to the status property.
38 <ul id="console"></ul>
39 <script>
40 test();
41 </script>