| OLD | NEW |
| (Empty) |
| 1 <html> | |
| 2 <head> | |
| 3 <script> | |
| 4 function notify() | |
| 5 { | |
| 6 if (window.testRunner) | |
| 7 testRunner.notifyDone(); | |
| 8 } | |
| 9 | |
| 10 function runTest() | |
| 11 { | |
| 12 if (window.testRunner) { | |
| 13 testRunner.dumpAsText(); | |
| 14 testRunner.waitUntilDone(); | |
| 15 } | |
| 16 | |
| 17 // No need to let this point to a real file. | |
| 18 | |
| 19 | |
| 20 var result = plg.getURL('file:///tmp.html', '_self'); | |
| 21 if (result == 1) | |
| 22 document.getElementById('result').innerHTML = "SUCCESS"; | |
| 23 else | |
| 24 document.getElementById('result').innerHTML = "FAILURE"; | |
| 25 | |
| 26 // Round-trip to the plugin once more, so errors can propagate. | |
| 27 plg.getURLNotify("resources/load-me-1.txt", null, "notify"); | |
| 28 } | |
| 29 </script> | |
| 30 </head> | |
| 31 <body onload="runTest()"> | |
| 32 <div>This tests that a plugin in a remote document can't access local files usin
g NPN_GetURL</div> | |
| 33 <embed name="plg" type="application/x-webkit-test-netscape"></embed> | |
| 34 <div id="result">FAILURE</div> | |
| 35 </body> | |
| 36 </html> | |
| OLD | NEW |