Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / dom / Window / custom-constructors.html
blobcb07098f76f0e63c5e4ac6f5ba624b0b9d865b35
1 <html>
2 <head>
3 <script src="../../../resources/js-test.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.testRunner) {
11 testRunner.dumpAsText();
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("WebKitCSSMatrix.prototype.toString.call(new WebKitCSSMatrix)", "'matrix(1.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000)'");
18 shouldBe("WebKitCSSMatrix.prototype.toString.call(new WebKitCSSMatrix())", "'matrix(1.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000)'");
19 shouldThrow("new WebKitCSSMatrix(null)");
20 shouldThrow("new WebKitCSSMatrix(undefined)");
21 shouldBe("XMLHttpRequest.prototype.toString.call(new XMLHttpRequest)", "'[object XMLHttpRequest]'");
22 shouldBe("XSLTProcessor.prototype.toString.call(new XSLTProcessor)", "'[object XSLTProcessor]'");
23 </script>
24 </body>
25 </html>