Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / js / pic / delete-global-object.html
blob1f8fff0949c93ccd56c380f02612403c4ed15406
1 <p>
2 This page tests for correct behavior in the case of a global object that has
3 had a property deleted. If the test passes, you'll see a PASS message below.
4 </p>
6 <pre id="console"></pre>
8 <script>
9 (function() {
10 if (window.testRunner)
11 testRunner.dumpAsText();
13 function log(s)
15 if (this.document)
16 document.getElementById("console").appendChild(document.createTextNode(s + "\n"));
17 else
18 print(s + "\n");
21 function shouldBe(a, aDescription, b)
23 if (a === b) {
24 log("PASS: " + aDescription + " should be " + b + " and is.");
25 } else {
26 log("FAIL: " + aDescription + " should be " + b + " but instead is " + a + ".");
30 a = 1;
31 delete a;
32 y = "";
33 window.__defineGetter__("x", function() { return y; });
35 window.__defineGetter__("y", function() { return 42; });
37 shouldBe(x, "x", 42);
38 })();
39 </script>