Update web-platform-tests to revision e75a8342e588e36a6ab387846a50d077621143b4

This commit is contained in:
WPT Sync Bot 2020-06-19 08:22:28 +00:00
parent 1527afff17
commit 6f842949ed
93 changed files with 1478 additions and 195 deletions

View file

@ -0,0 +1,27 @@
async_test(t => {
const blob = new Blob(
[
`aaa\u001B$@<textarea>\u001B(B<script>/* xss */<\/script></textarea>bbb`
],
{type: 'text/html;charset=utf-8'});
const url = URL.createObjectURL(blob);
const win = window.open(url);
t.add_cleanup(() => win.close());
win.onload = t.step_func_done(() => {
assert_equals(win.document.charset, 'UTF-8');
});
}, 'Blob charset should override any auto-detected charset.');
async_test(t => {
const blob = new Blob(
[`<!doctype html>\n<meta charset="ISO-8859-1">`],
{type: 'text/html;charset=utf-8'});
const url = URL.createObjectURL(blob);
const win = window.open(url);
t.add_cleanup(() => win.close());
win.onload = t.step_func_done(() => {
assert_equals(win.document.charset, 'UTF-8');
});
}, 'Blob charset should override <meta charset>.');