Use testRunner instead of layoutTestController in tests still found to be using layou...
[WebKit-https.git] / LayoutTests / platform / chromium / permissionclient / script-permissions.html
1 <html>
2 <head>
3 <script>
4 if (window.testRunner) {
5     testRunner.dumpAsText();
6     testRunner.dumpPermissionClientCallbacks();
7 }
8
9 function log(a)
10 {
11     document.getElementById("log").innerHTML += a + "<br>";
12 }
13
14 function test()
15 {
16     if (window.testRunner && testRunner.setScriptsAllowed)
17         testRunner.setScriptsAllowed(false);
18     else
19         log("This test requires testRunner.setScriptsAllowed, so it be can't run in a browser.");
20
21     // Try to load an external script.
22     var script = document.createElement('script');
23     script.src = "resources/script.js";
24     document.getElementById("script").appendChild(script);
25 }
26 </script>
27 </head>
28 <body onload="test()">
29 <div id="script"></div>
30 <div id="log"></div>
31 </body>
32 </html>