4 function print(message
, color
)
6 var paragraph
= document
.createElement("div");
7 paragraph
.appendChild(document
.createTextNode(message
));
8 paragraph
.style
.fontFamily
= "monospace";
10 paragraph
.style
.color
= color
;
11 document
.getElementById("console").appendChild(paragraph
);
14 function shouldBe(a
, b
)
18 print("PASS: " + a
+ " should be " + b
+ " and is.", "green");
20 print("FAIL: " + a
+ " should be " + b
+ " but instead is " + evalA
+ ".", "red");
25 if (window
.layoutTestController
)
26 layoutTestController
.dumpAsText();
30 window
.XMLHttpRequest
= 1;
31 window
.XMLSerializer
= 1;
33 window
.XSLTProcessor
= 1;
35 shouldBe("window.Image", 1);
36 shouldBe("window.Option", 1);
37 shouldBe("window.XMLHttpRequest", 1);
38 shouldBe("window.XMLSerializer", 1);
39 shouldBe("window.DOMParser", 1);
40 shouldBe("window.XSLTProcessor", 1);
45 <body onload=
"test();">
46 <p>This page tests whether certain global constructors are read-only. Previous versions of WebKit incorrectly
47 made them read-only.
</p>
48 <p>If the test passes, you'll see a series of pass message below.
</p>
51 <div id='console'
></div>