3 <body onload=
"runTest()">
4 <script src=
"../../resources/js-test.js"></script>
5 <script src=
"resources/common.js"></script>
6 <form action=
"resources/success.txt" method=
"GET" target=
"failFrame">
7 <input type=
"submit" id=
"button" formtarget=
"passFrame">
10 description("Test for the formtarget attribute in an input tag.");
13 if (window
.testRunner
) {
14 testRunner
.setAllowUniversalAccessFromFileURLs(true);
15 testRunner
.waitUntilDone();
17 clickElement(document
.getElementById('button'));
20 function passFrameLoaded() {
21 if (document
.getElementById('pass').contentDocument
.URL
== "about:blank")
23 testPassed("The formtarget attribute was successfully used.");
24 isSuccessfullyParsed();
25 if (window
.testRunner
)
26 testRunner
.notifyDone();
29 function failFrameLoaded() {
30 if (document
.getElementById('fail').contentDocument
.URL
== "about:blank")
32 testFailed("The formtarget attribute was not used.");
33 isSuccessfullyParsed();
34 if (window
.testRunner
)
35 testRunner
.notifyDone();
38 <iframe src=
"about:blank" id=
"pass" name=
"passFrame" onload=
"passFrameLoaded()"></iframe>
39 <iframe src=
"about:blank" id=
"fail" name=
"failFrame" onload=
"failFrameLoaded()"></iframe>