1 <html> 2 <head> 3 <title>Calling bindings constructors as function should not cause a crash</title> 4 <script> 5 if (window.layoutTestController) 6 layoutTestController.dumpAsText(); 7 8 function runTest() 9 { 10 // List of constructors to test. 11 var constructors = ["EventSource", "MessageChannel", "SharedWorker", "WebGLArrayBuffer", "WebKitCSSMatrix", "WebKitPoint", "WebSocket", "Worker", "XMLHttpRequest", "XSLTProcessor"]; 12 var result = document.getElementById("result"); 13 for (var i in constructors) { 14 try { 15 var func = constructors[i] + "()"; 16 eval(func); 17 result.innerHTML += "FAIL"; 18 } 19 catch (e) { 20 result.innerHTML += "PASS"; 21 } 22 result.innerHTML += ": " + constructors[i] + "<br/>"; 23 } 24 } 25 26 </script> 27 </head> 28 <body onload="runTest()"> 29 <p>Calling <code>bindings</code> constructors as function should throw an exception and not cause a crash.</p> 30 <div id="result"></div> 31 </html> 32 33