mirror of
https://github.com/servo/servo.git
synced 2025-06-24 17:14:33 +01:00
Add a test for changing the charset attribute of a script while it is loading.
This commit is contained in:
parent
f696f311dc
commit
06ab3e0158
2 changed files with 30 additions and 1 deletions
|
@ -0,0 +1,20 @@
|
|||
<!DOCTYPE html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Script changing @charset</title>
|
||||
<link rel="help" href="https://html.spec.whatwg.org/multipage/#scriptingLanguages">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<div id="log"></div>
|
||||
<script>
|
||||
async_test(function() {
|
||||
var s = document.createElement("script");
|
||||
s.src = "external-script-windows1250.js";
|
||||
s.charset = "windows-1250";
|
||||
document.body.appendChild(s);
|
||||
s.charset = "utf-8";
|
||||
window.onload = this.step_func_done(function() {
|
||||
assert_equals(window.getSomeString(), "\u015b\u0107\u0105\u017c\u017a");
|
||||
});
|
||||
})
|
||||
</script>
|
Loading…
Add table
Add a link
Reference in a new issue