Source/WebCore: [V8] Crash in npObjectGetProperty() in V8NPObject.cpp
[WebKit-https.git] / LayoutTests / plugins / get-url-with-blank-target.html
1 <html>
2 <body>
3 <embed name="plg" type="application/x-webkit-test-netscape"></embed>
4 <script>
5 var NPERR_GENERIC_ERROR = 1;
6
7 function callback(result) {
8     var d = document.getElementById('result');
9
10     if (result == NPERR_GENERIC_ERROR)
11         d.innerHTML = "SUCCESS"
12     else
13         d.innerHTML = "FAILED - Expected error code 1 but got error code " + result
14
15     layoutTestController.notifyDone();
16 }
17
18 if (window.layoutTestController) {
19     layoutTestController.dumpAsText();
20     layoutTestController.waitUntilDone();
21     
22     plg.getURLNotify("http://www.apple.com", "_blank", "callback");
23 } else {
24     document.write("Cannot run interactively");
25 }
26 </script>This tests that we won't crash when a plugin tries to open an URL in a new window when the application does not create the window. If this test is successful, the word SUCCESS should be seen below.
27 <div id="result">FAILED</div>
28 </body>
29 </html>