summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/LayoutTests/http/tests/misc/script-no-store.html
blob: 352e0c003d0d50bc33c00aeebf504492c3246e47 (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
<body>
<script>
var count = 0;

if (window.testRunner) {
    testRunner.dumpAsText();
    testRunner.waitUntilDone();
}

function addRandom()
{
    var script = document.createElement("script");
    script.setAttribute("src", "resources/random-no-store.php");
    document.body.appendChild(script);
}
++count;
addRandom();

setInterval(function() {
    if (count == 1 && document.getElementsByTagName("p").length == 1) {
        ++count;
        addRandom();
    } else if (document.getElementsByTagName("p").length == 2) {
        document.write(document.getElementsByTagName("p")[0].innerHTML == document.getElementsByTagName("p")[1].innerHTML ? 
            "FAIL<br>" : "PASS<br>");
        if (window.testRunner)
            testRunner.notifyDone();
    }
}, 10);
</script>