blob: b18f462138c8d068e1fb8ac66d7a9f25b2606c40 [file] [log] [blame]
<html>
<head>
<script src="../../../resources/js-test.js"></script>
</head>
<body>
<div id="description"></div>
<div id="console"></div>
<script>
description('Test constructors for classes in Window');
if (window.testRunner) {
testRunner.dumpAsText();
}
shouldBe("Audio.prototype.toString.call(new Audio)", "'[object HTMLAudioElement]'");
shouldBe("Image.prototype.toString.call(new Image)", "'[object HTMLImageElement]'");
shouldBe("Option.prototype.toString.call(new Option)", "'[object HTMLOptionElement]'");
shouldBe("WebKitCSSMatrix.prototype.toString.call(new WebKitCSSMatrix)", "'matrix(1, 0, 0, 1, 0, 0)'");
shouldBe("WebKitCSSMatrix.prototype.toString.call(new WebKitCSSMatrix())", "'matrix(1, 0, 0, 1, 0, 0)'");
shouldThrow("new WebKitCSSMatrix(null)");
shouldThrow("new WebKitCSSMatrix(undefined)");
shouldBe("XMLHttpRequest.prototype.toString.call(new XMLHttpRequest)", "'[object XMLHttpRequest]'");
shouldBe("XSLTProcessor.prototype.toString.call(new XSLTProcessor)", "'[object XSLTProcessor]'");
</script>
</body>
</html>