summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/LayoutTests/permissionclient/script-permissions.html
blob: 8dbc88ca1d707d1ec560fcd6e29d06a7da80e24e (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>
<head>
<script>
if (window.testRunner) {
    testRunner.dumpAsText();
    testRunner.dumpPermissionClientCallbacks();
}

function log(a)
{
    document.getElementById("log").innerHTML += a + "<br>";
}

function test()
{
    if (window.testRunner && testRunner.setScriptsAllowed)
        testRunner.setScriptsAllowed(false);
    else
        log("This test requires testRunner.setScriptsAllowed, so it be can't run in a browser.");

    // Try to load an external script.
    var script = document.createElement('script');
    script.src = "resources/script.js";
    document.getElementById("script").appendChild(script);
}
</script>
</head>
<body onload="test()">
<div id="script"></div>
<div id="log"></div>
</body>
</html>