diff options
Diffstat (limited to 'LayoutTests/fast/constructors')
-rw-r--r-- | LayoutTests/fast/constructors/constructor-as-function-crash-expected.txt | 13 | ||||
-rw-r--r-- | LayoutTests/fast/constructors/constructor-as-function-crash.html | 32 |
2 files changed, 45 insertions, 0 deletions
diff --git a/LayoutTests/fast/constructors/constructor-as-function-crash-expected.txt b/LayoutTests/fast/constructors/constructor-as-function-crash-expected.txt new file mode 100644 index 0000000..cf56e2e --- /dev/null +++ b/LayoutTests/fast/constructors/constructor-as-function-crash-expected.txt @@ -0,0 +1,13 @@ +Calling bindings constructors as function should throw an exception and not cause a crash. + +PASS: EventSource +PASS: MessageChannel +PASS: SharedWorker +PASS: WebGLArrayBuffer +PASS: WebKitCSSMatrix +PASS: WebKitPoint +PASS: WebSocket +PASS: Worker +PASS: XMLHttpRequest +PASS: XSLTProcessor + diff --git a/LayoutTests/fast/constructors/constructor-as-function-crash.html b/LayoutTests/fast/constructors/constructor-as-function-crash.html new file mode 100644 index 0000000..29e20d3 --- /dev/null +++ b/LayoutTests/fast/constructors/constructor-as-function-crash.html @@ -0,0 +1,32 @@ +<html> +<head> + <title>Calling bindings constructors as function should not cause a crash</title> + <script> + if (window.layoutTestController) + layoutTestController.dumpAsText(); + + function runTest() + { + // List of constructors to test. + var constructors = ["EventSource", "MessageChannel", "SharedWorker", "WebGLArrayBuffer", "WebKitCSSMatrix", "WebKitPoint", "WebSocket", "Worker", "XMLHttpRequest", "XSLTProcessor"]; + var result = document.getElementById("result"); + for (var i in constructors) { + try { + var func = constructors[i] + "()"; + eval(func); + result.innerHTML += "FAIL"; + } + catch (e) { + result.innerHTML += "PASS"; + } + result.innerHTML += ": " + constructors[i] + "<br/>"; + } + } + + </script> +</head> +<body onload="runTest()"> + <p>Calling <code>bindings</code> constructors as function should throw an exception and not cause a crash.</p> + <div id="result"></div> +</html> + |