blob: 1118bce45697f355c94048c541215877e69a685a [file] [log] [blame]
<!DOCTYPE html>
<!--
The test verifies that a form with target="crossSiteFrame" and
with enctype="multipart/form-data" works fine
(especially in presence of out-of-process-iframes, aka OOPIFs, aka
blink::RemoteFrames which are present in --site-per-process mode).
The test finishes successfully, if form-target.pl ends up calling
testRunner.notifyDone() after main frame calls testRuner.waitUntilDone
and submits the form. Expected test output helps verify that the
correct HTTP headers were sent together with the HTTP POST request.
In particular, if wrong Content-Type header is send with the HTTP request,
then the field value will be garbled:
- Expected:
test-field = test-value
- Actual if no Content-Type is sent:
------WebKitFormBoundaryxVEhq0cRaPT6heQg Content-Disposition: form-data =
name = "test-field" test-value ------WebKitFormBoundaryxVEhq0cRaPT6heQg--
-->
<html>
<script>
if (window.testRunner) {
testRunner.dumpAsText();
testRunner.dumpChildFrames();
}
function onLoad() {
if (window.testRunner)
testRunner.waitUntilDone();
document.forms[0].submit();
}
</script>
<body onload="onLoad();">
<form
method="POST"
enctype="multipart/form-data"
action="http://localhost:8080/navigation/resources/form-target.pl"
target="cross-site-frame">
Test field:
<input name="test-field" type="text" value="test-value">
<input type="submit" value="Submit">
</form>
<iframe
name="cross-site-frame"
src="http://localhost:8080/navigation/resources/otherpage.html"></iframe>
</body>
</html>