23 lines
962 B
HTML
23 lines
962 B
HTML
<!doctype html>
|
|
<meta charset={{GET[encoding]}}> <!-- ends up as <meta charset> by default which is windows-1252 -->
|
|
<meta name=variant content="?encoding=windows-1252">
|
|
<meta name=variant content="?encoding=x-cp1251">
|
|
<meta name=variant content="?encoding=utf8">
|
|
<script src="/resources/testharness.js"></script>
|
|
<script src="/resources/testharnessreport.js"></script>
|
|
<iframe id="i" src="/common/blank.html"></iframe>
|
|
<!-- Test for https://github.com/whatwg/html/pull/9756 -->
|
|
|
|
<script>
|
|
async_test(t => {
|
|
window.onload = t.step_func(() => {
|
|
i.contentWindow.navigation.navigate("?\u00FF");
|
|
|
|
i.onload = t.step_func_done(() => {
|
|
const iframeURL = new URL(i.contentWindow.navigation.currentEntry.url);
|
|
assert_equals(iframeURL.pathname, "/common/blank.html", "pathname");
|
|
assert_equals(iframeURL.search, "?%C3%BF", "search");
|
|
});
|
|
});
|
|
}, "navigate() should resolve URLs assuming UTF-8, ignoring the document's encoding");
|
|
</script>
|