Files
firefox/dom/encoding/test/test_submit_euckr.html
Vincent Hilla 9812cb2647 Bug 543435 - Only reuse inner window for uncommitted initial documents. r=smaug,asuth,credential-management-reviewers,webrtc-reviewers,pehrsons,hsivonen,dimi
The conceptual change is small but it requires several test changes.

In principle, tests cannot open a new empty window, modify the global, then
load their target document and expect their modifications to stick. Only if the
target URI is opened directly, the synchronously available window is reused. So
either tests need to do that, or rely on messages.

Differential Revision: https://phabricator.services.mozilla.com/D265268
2025-11-24 05:34:29 +00:00

32 lines
860 B
HTML

<!DOCTYPE html>
<html>
<head>
<meta charset=utf-8>
<title>Test for euc-kr encoded form submission</title>
<script type="text/javascript" src="/resources/testharness.js"></script>
<script type="text/javascript" src="/resources/testharnessreport.js"></script>
</head>
<body>
<div id="log"></div>
<iframe name="ifr"></iframe>
<form accept-charset="euc-kr" action="abc" target="ifr">
<input type="hidden" name="a" value="&#xAC02;">
</form>
<script>
async_test((t) => {
const form = document.forms[0];
const iframe = document.querySelector('iframe');
// note: listener must be on the iframe, not the window that will be replaced
iframe.onload = t.step_func_done(() =>
assert_equals("".split.call(iframe.contentWindow.location, "?")[1], "a=%81A")
);
form.submit();
}, "Test for euc-kr encoded form submission");
</script>
</body>
</html>