mirror of
https://github.com/mozilla-firefox/firefox.git
synced 2026-06-18 12:14:01 -05:00
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
32 lines
860 B
HTML
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="갂">
|
|
</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>
|