mirror of
https://github.com/servo/servo.git
synced 2025-08-08 23:15:33 +01:00
Update web-platform-tests to revision e75a8342e588e36a6ab387846a50d077621143b4
This commit is contained in:
parent
1527afff17
commit
6f842949ed
93 changed files with 1478 additions and 195 deletions
|
@ -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>.');
|
Loading…
Add table
Add a link
Reference in a new issue