summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/LayoutTests/fast/loader/submit-form-while-parsing-2.html
blob: 9ed3e26cbf1238cbb8d83b39e394f29cb42262c1 (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
33
34
35
36
37
38
39
40
<script>

var frameIsLoaded = false;
var testIsStarted = false;

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

    testIsStarted = true;
    if (frameIsLoaded)
        frameLoaded();
}

function frameLoaded()
{
    if (!testIsStarted) {
        frameIsLoaded = true;
        return;
    }

    if (document.getElementById('frame').contentWindow.location != "about:blank") {
        document.getElementById("message").firstChild.data = "FAILED: Subframe had the wrong location";
        return;
    }

    document.getElementById("message").firstChild.data = "PASSED: If we successfully got here without an assertion or crash, all is well.";

    if (window.testRunner)
        testRunner.notifyDone();
}

</script>
<body onload="startTest()">
<p id="message">TEST DID NOT RUN YET</p>
<iframe src="resources/submit-form-while-parsing-subframe.html" id="frame" onload="frameLoaded()"></iframe>
</body>