blob: d78418a0d5c699701d3f011cc80a11dffd9c5fdd [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.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000)'");
shouldBe("WebKitCSSMatrix.prototype.toString.call(new WebKitCSSMatrix())", "'matrix(1.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000)'");
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>
<script src="../../../resources/js-test-post.js"></script>
</body>
</html>