summaryrefslogtreecommitdiffstats
path: root/webkit/data/layout_tests/chrome/plugins/get-url-with-blank-target.html
blob: c61db2bb72c104b74bd5a978109ad0d2a861a2e9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
<html>
<script>
var NPERR_NO_ERROR = 0;
var NPERR_GENERIC_ERROR = 1;

function callback(result) {
    var d = document.getElementById('result');

    if (result == NPERR_NO_ERROR)
        d.innerHTML = "SUCCESS"
    else
        d.innerHTML = "FAILED - got error code " + result

    layoutTestController.notifyDone();
}

function runtest() {
    if (window.layoutTestController) {
        layoutTestController.dumpAsText();
        layoutTestController.waitUntilDone();
        plg.getURLNotify("http://www.apple.com", "_blank", "callback");
    } else {
        document.write("Cannot run interactively");
    }
}
</script>
<body onload="runtest()">
<embed id="plg" type="application/x-webkit-test-netscape"></embed>
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.
<div id="result">FAILED</div>
</body>
</html>