21 lines
713 B
HTML
21 lines
713 B
HTML
<!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", "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>
|