1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
4 <script src="../../fast/js/resources/js-test-pre.js"></script>
6 <body onload="runTest()">
7 <form action="resources/success.txt" method="GET" target="failFrame">
8 <input type="submit" id="button" formtarget="passFrame">
11 description("Test for the formtarget attribute in an input tag.");
15 if (window.layoutTestController) {
16 layoutTestController.setAllowUniversalAccessFromFileURLs(true);
17 layoutTestController.waitUntilDone();
20 // Not dumping as text since the DumpRenderTree does not dump the text content of child frames.
21 var button = document.getElementById('button');
25 function passFrameLoaded()
27 if (document.getElementById('pass').contentDocument.URL == "about:blank")
29 testPassed("The formtarget attribute was successfully used.");
30 isSuccessfullyParsed();
31 if (window.layoutTestController)
32 layoutTestController.notifyDone();
35 function failFrameLoaded()
37 if (document.getElementById('fail').contentDocument.URL == "about:blank")
39 testFailed("The formtarget attribute was not used.");
40 isSuccessfullyParsed();
41 if (window.layoutTestController)
42 layoutTestController.notifyDone();
45 <iframe src="about:blank" id="pass" name="passFrame" onload="passFrameLoaded()"></iframe>
46 <iframe src="about:blank" id="fail" name="failFrame" onload="failFrameLoaded()"></iframe>