Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / js / pic / rehash-poisons-structure.html
blob45c0352823dfd113fd1ae2accda718cf8b1d4fc8
1 <p>
2 This page tests a specific set of conditions that could cause a property map to
3 rehash, giving two objects with equal structure ID's unequal structures. If the
4 test passes, 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 getP7(o)
33 return o.p7;
36 var o = {
37 p1: 1,
38 p2: 1,
39 p3: 1,
40 p4: 1,
41 p5: 1,
42 p6: 1,
43 p7: 1,
44 p8: 1
47 o.p7 = 1;
49 var o2 = {
50 p1: 1,
51 p2: 1,
52 p3: 1,
53 p4: 1,
54 p5: 1,
55 p6: 1,
56 p7: 1,
57 p8: 1
60 getP7(o);
61 getP7(o);
63 shouldBe(getP7(o) == getP7(o2), "getP7(o) == getP7(o2)", true);
64 })();
65 </script>