Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / js / pic / cached-single-entry-transition.html
blob5c6e84997250dd8a20c39ad7e500e5ffab624341
1 <p>
2 This page verifies that the single property optimization doesn't cause similar
3 looking objects to be given the same structure identifiers. If the test passes,
4 you'll see a PASS message below.
5 </p>
7 <pre id="console"></pre>
9 <script>
10 (function() {
11 if (window.testRunner)
12 testRunner.dumpAsText();
14 function log(s)
16 if (this.document)
17 document.getElementById("console").appendChild(document.createTextNode(s + "\n"));
18 else
19 print(s + "\n");
22 function shouldBe(a, aDescription, b)
24 if (a === b) {
25 log("PASS: " + aDescription + " should be " + b + " and is.");
26 } else {
27 log("FAIL: " + aDescription + " should be " + b + " but instead is " + a + ".");
31 function getA(o)
33 return o.a;
36 var o1 = { a: 1, x: 1 };
37 var o2 = { b: 1, x: 1 };
39 getA(o1);
40 getA(o1);
42 shouldBe(getA(o2), "getA(o2)", undefined);
43 })();
44 </script>