1 <!DOCTYPE HTML PUBLIC
"-//IETF//DTD HTML//EN">
4 <script src=
"../../resources/js-test.js"></script>
6 <body onload=
"runTest()">
7 <form action=
"resources/success.txt" method=
"GET" target=
"failFrame">
8 <button type=
"submit" id=
"button" formtarget=
"passFrame">
11 description("Test for the formtarget attribute in a button tag.");
15 if (window
.testRunner
) {
16 testRunner
.setAllowUniversalAccessFromFileURLs(true);
17 testRunner
.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
.testRunner
)
32 testRunner
.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
.testRunner
)
42 testRunner
.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>