blob: e90a61d7182937c4ca259d913017da7512a651c3 [file] [log] [blame]
<!DOCTYPE html><!-- webkit-test-runner [ AllowUniversalAccessFromFileURLs=false ] -->
<html>
<body onload="runTest()">
<script src="../../resources/js-test-pre.js"></script>
<script src="resources/common.js"></script>
<form action="resources/success.txt" method="GET" target="failFrame">
<input type="submit" id="button" formtarget="passFrame">
</form>
<script>
description("Test for the formtarget attribute in an input tag.");
function runTest() {
if (window.testRunner) {
testRunner.waitUntilDone();
}
clickElement(document.getElementById('button'));
}
function passFrameLoaded() {
if (document.getElementById('pass').contentDocument.URL == "about:blank")
return;
testPassed("The formtarget attribute was successfully used.");
isSuccessfullyParsed();
if (window.testRunner)
testRunner.notifyDone();
}
function failFrameLoaded() {
if (document.getElementById('fail').contentDocument.URL == "about:blank")
return;
testFailed("The formtarget attribute was not used.");
isSuccessfullyParsed();
if (window.testRunner)
testRunner.notifyDone();
}
</script>
<iframe src="about:blank" id="pass" name="passFrame" onload="passFrameLoaded()"></iframe>
<iframe src="about:blank" id="fail" name="failFrame" onload="failFrameLoaded()"></iframe>
</body>
</html>