blob: 85748f3961e211db0850cfaa37122e44f4c92f43 [file] [log] [blame]
<html>
<head>
<script src="../../../resources/js-test-pre.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("WebKitPoint.prototype.toString.call(new WebKitPoint)", "'[object WebKitPoint]'");
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)'");
shouldBe("WebKitCSSMatrix.prototype.toString.call(new WebKitCSSMatrix(undefined))", "'matrix(1, 0, 0, 1, 0, 0)'");
shouldThrow("new WebKitCSSMatrix(null)");
shouldBe("XMLHttpRequest.prototype.toString.call(new XMLHttpRequest)", "'[object XMLHttpRequest]'");
shouldBe("XSLTProcessor.prototype.toString.call(new XSLTProcessor)", "'[object XSLTProcessor]'");
</script>
<script src="../../../resources/js-test-post.js"></script>
</body>
</html>