OLD | NEW |
---|---|
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <html> | 2 <html> |
3 <body> | 3 <body> |
4 <script src="../../resources/js-test.js"></script> | 4 <script src="../../resources/js-test.js"></script> |
5 <script> | 5 <script> |
6 | 6 |
7 description("This tests if TypeError is thrown or not when we call a constructor as a normal function."); | 7 description("This tests if TypeError is thrown or not when we call a constructor as a normal function."); |
8 | 8 |
9 var test_constructors = ["ArrayBuffer", "AudioContext", "FormData", "DataView", "EventSource", "FileReader", "Float32Array", "Float64Array", "Audio", "Image", " Option", "Int16Array", "Int32Array", "Int8Array", "MessageChannel", "SharedWorke r", "Uint16Array", "Uint32Array", "Uint8Array", "WebKitCSSMatrix", "WebKitPoint" , "WebSocket", "Worker", "XMLHttpRequest", "XSLTProcessor"]; | 9 var test_constructors = ["ArrayBuffer", "AudioContext", "FormData", "DataView", "EventSource", "FileReader", "Float32Array", "Float64Array", "Audio", "Image", " Option", "Int16Array", "Int32Array", "Int8Array", "MessageChannel", "SharedWorke r", "Uint16Array", "Uint32Array", "Uint8Array", "WebKitCSSMatrix", "WebSocket", "Worker", "XMLHttpRequest", "XSLTProcessor"]; |
10 | 10 |
11 test_constructors.forEach(function (constructor) { | 11 test_constructors.forEach(function (constructor) { |
12 if (eval("window." + constructor)) | 12 if (eval("window." + constructor)) |
13 shouldThrow(constructor + "()"); | 13 shouldThrow(constructor + "()"); |
14 else | 14 else |
15 debug("SKIP " + constructor + " is not implemented."); | 15 debug("SKIP " + constructor + " is not implemented."); |
16 }); | 16 }); |
17 </script> | 17 </script> |
18 </body> | 18 </body> |
19 </html> | 19 </html> |
OLD | NEW |