summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/LayoutTests/fast/forms/targeted-frame-submission.html
blob: 4567547c0a3753cc7d4cc56bd2ac5f5e24fad141 (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>

            function runTest()
            {
                if (window.testRunner)
                    testRunner.waitUntilDone();

                // Not dumping as text since the DumpRenderTree does not dump the text content of child frames.                
                var button = document.getElementById('blankButton');
                button.click();
            }

            function subframeLoaded()
            {
                if (document.getElementsByTagName('iframe')[0].contentDocument.URL == "about:blank")
                    return;
                if (window.testRunner)
                    testRunner.notifyDone();
            }

        </script>
    </head>
    <body onload="runTest()">
        <form action="resources/success.txt" method="GET" target="blankFrame">
            <input type="submit" value="form" id="blankButton">
        </form>
        <div>This tests Targetted frame submission works.  If the test is successful, the text "SUCCESS" should be shown in the iframe below.</div>
        <iframe src="about:blank" name="blankFrame" onload="subframeLoaded()"></iframe>
    </body>
</html>