Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / js / pic / get-empty-string.html
bloba54875a8cf0d15bb842ae9d0c42c084924f3c0c2
1 <p>
2 This page tests the empty string used as a property name. If the test passes,
3 you'll see a PASS message below.
4 </p>
6 <pre id="console"></pre>
8 <script>
9 if (window.testRunner)
10 testRunner.dumpAsText();
12 (function() {
13 function log(s)
15 if (this.document)
16 document.getElementById("console").appendChild(document.createTextNode(s));
17 else
18 print(s);
21 function shouldBe(a, aDescription, b)
23 if (a === b) {
24 log("PASS: " + aDescription + " should be " + b + " and is.\n");
25 } else {
26 log("FAIL: " + aDescription + " should be " + b + " but instead is " + a + ".\n");
30 var o = { x: 1 };
31 o[""] = 1;
32 shouldBe(o[""], 'o[""]', 1);
33 })();
34 </script>