summaryrefslogtreecommitdiffstats
path: root/chrome/test/data/npapi/self_delete_plugin_geturl.html
blob: 2d14340b4ff0cfe71ade2282ac6f5729ef3a913b (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
33
34
35
36
37
<html>
<head>
<title>Self Deleting Plugin Test - GetURL</title>
<script src="npapi.js"></script>
<script>
function DeletePluginWithinScript() {
  var plugin_div = document.getElementById("PluginDiv");
  plugin_div.innerHTML = "Object Deleted";
}

function CallGetUrl() {
  var plg = window.document["plg"];
  plg.getURL("javascript:DeletePluginWithinScript()");
}
</script>
</head>

<body>

<h2>Test to delete a plugin during script execution</h2>

<p>
This test is for a corner case when a plugin executes a script
that deletes the invoking plugin itself.
</p>

<DIV ID=PluginDiv>
<embed name="plg" type="application/x-webkit-test-netscape"></embed>
</DIV>
<script> 
  CallGetUrl();
  onSuccess("self_delete_plugin_geturl", 1);
</script>

</body>
</html>