JS Test Harness: Insert the stylesheet dynamically
[WebKit-https.git] / LayoutTests / fast / dom / Window / custom-constructors.html
1 <html>
2 <head>
3 <script src="../../js/resources/js-test-pre.js"></script>
4 </head>
5 <body>
6 <div id="description"></div>
7 <div id="console"></div>
8 <script>
9     description('Test constructors for classes in Window');
10     if (window.layoutTestController) {
11         layoutTestController.dumpAsText();
12     }
13
14     shouldBe("Audio.prototype.toString.call(new Audio)", "'[object HTMLAudioElement]'");
15     shouldBe("Image.prototype.toString.call(new Image)", "'[object HTMLImageElement]'");
16     shouldBe("Option.prototype.toString.call(new Option)", "'[object HTMLOptionElement]'");
17     shouldBe("WebKitPoint.prototype.toString.call(new WebKitPoint)", "'[object WebKitPoint]'");
18     shouldBe("WebKitCSSMatrix.prototype.toString.call(new WebKitCSSMatrix)", "'matrix(1.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000)'");
19     shouldBe("WebKitCSSMatrix.prototype.toString.call(new WebKitCSSMatrix())", "'matrix(1.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000)'");
20     shouldThrow("new WebKitCSSMatrix(null)");
21     shouldThrow("new WebKitCSSMatrix(undefined)");
22     shouldBe("XMLHttpRequest.prototype.toString.call(new XMLHttpRequest)", "'[object XMLHttpRequest]'");
23     shouldBe("XSLTProcessor.prototype.toString.call(new XSLTProcessor)", "'[object XSLTProcessor]'");
24
25     successfullyParsed = true;
26 </script>
27 <script src="../../js/resources/js-test-post.js"></script>
28 </body>
29 </html>