blob: 6d0888a8bcfa816d0248f7ab982d3c5075a70098 [file] [log] [blame]
<!DOCTYPE html>
<html>
<body>
<script src="../../resources/js-test.js"></script>
<script>
description("This tests if TypeError is thrown or not when we call a constructor as a normal function.");
var test_constructors = ["ArrayBuffer", "AudioContext", "FormData", "DataView", "EventSource", "FileReader", "Float32Array", "Float64Array", "Audio", "Image", "Option", "Int16Array", "Int32Array", "Int8Array", "MessageChannel", "SharedWorker", "Uint16Array", "Uint32Array", "Uint8Array", "WebKitCSSMatrix", "WebSocket", "Worker", "XMLHttpRequest", "XSLTProcessor"];
test_constructors.forEach(function (constructor) {
if (eval("window." + constructor))
shouldThrow(constructor + "()");
else
debug("SKIP " + constructor + " is not implemented.");
});
</script>
</body>
</html>