2 This page tests cached access to properties of dictionary objects and objects
3 with changing prototypes. If the test passes, you'll see a series of PASS messages
7 <pre id=
"console"></pre>
11 if (window
.testRunner
)
12 testRunner
.dumpAsText();
17 document
.getElementById("console").appendChild(document
.createTextNode(s
+ "\n"));
22 function shouldBe(a
, aDescription
, b
)
25 log("PASS: " + aDescription
+ " should be " + b
+ " and is.\n");
27 log("FAIL: " + aDescription
+ " should be " + b
+ " but instead is " + a
+ ".\n");
45 for (var i
= 0; i
< 128; ++i
)
48 shouldBe(getX(o
), "getX(o)", 0);
72 shouldBe(getProtoX(o
), "getProtoX(o)", 2);
91 delete o
.__proto__
.protoX
;
93 shouldBe(getProtoX(o
), "getProtoX(o)", undefined);