7 if (window.layoutTestController)
8 layoutTestController.dumpAsText();
10 var localScriptLocation = "file:///tmp/LayoutTests/http/tests/security/resources/localScript.js";
11 if (window.layoutTestController)
12 localScriptLocation = layoutTestController.pathToLocalResource(localScriptLocation);
14 var localScriptElement = document.createElement("script");
15 localScriptElement.setAttribute("src", localScriptLocation);
16 localScriptElement.addEventListener("load", function() {
17 var tag = document.getElementById("result");
19 tag.innerHTML = "Test Failed. Local script loaded and run.";
21 tag.innerHTML = "Test Failed. Local script loaded, but not successfully run.";
24 localScriptElement.addEventListener("error", function() {
25 var tag = document.getElementById("result");
26 tag.innerHTML = "Test Passed: Local script not loaded.";
29 document.body.appendChild(localScriptElement)
33 <body onload="test()">
35 This test is to see if a remote file can run a local script.
37 Currently this test cannot be run manually on Windows because we do not have
38 a function like pathToLocalResource() outside of DRT.
43 Test not run correctly.