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