chromium/third_party/blink/web_tests/fast/dom/Window/custom-constructors.html

<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>