summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/LayoutTests/fast/forms/form-submit-in-image-document.html
blob: 16b0fc24debbd7ded732a4d732cd27749f50c2e5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
<!DOCTYPE html>
<body>
<script src="../../resources/js-test.js"></script>

<iframe src="resources/logo.gif"></iframe>

<script>
description('Test if Blink does not crash by form submission in a document with null encoding.');
jsTestIsAsync = true;

function finish() {
    testPassed('if not crashed');
    finishJSTest();
}

window.onload = function() {
    var doc = document.querySelector('iframe').contentDocument;
    var form = doc.createElement('form');
    form.action = 'javascript:parent.finish()';
    form.innerHTML = '<input type="hidden" name="hidden">';
    doc.body.appendChild(form);
    form.submit();
};
</script>
</body>