Update web-platform-tests to revision ea14651f262003177d0ba5819bd2806a1327b12a

This commit is contained in:
WPT Sync Bot 2018-04-30 21:09:29 -04:00
parent 847115ba04
commit 816185f094
272 changed files with 5766 additions and 2855 deletions

View file

@ -0,0 +1,32 @@
<!DOCTYPE html>
<head>
<meta charset="utf-8">
<link rel="help" href="https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#constructing-the-form-data-set">
<link ref="help" href="https://xhr.spec.whatwg.org/#dom-formdata">
<link rel="help" href="https://fetch.spec.whatwg.org/#concept-bodyinit-extract">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
</head>
<body>
<iframe name="frame1"></iframe>
<form accept-charset="iso-8859-1" target="frame1" action="/common/blank.html">
<input type="hidden" name="_charset_">
</form>
<script>
test(() => {
let formData = new FormData(document.querySelector('form'));
assert_equals(formData.get('_charset_'), 'UTF-8');
}, 'FormData constructor always produces UTF-8 _charset_ value.');
let t = async_test('_charset_ control sets the expected encoding name.');
t.step(() => {
let iframe = document.querySelector('iframe');
iframe.onload = t.step_func_done(() => {
assert_not_equals(iframe.contentDocument.URL.indexOf('_charset_=windows-1252'), -1);
});
document.querySelector('form').submit();
});
</script>
</body>