mirror of
https://github.com/servo/servo.git
synced 2025-06-24 09:04: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
|
@ -37203,7 +37203,16 @@
|
|||
"local_changes": {
|
||||
"deleted": [],
|
||||
"deleted_reftests": {},
|
||||
"items": {},
|
||||
"items": {
|
||||
"testharness": {
|
||||
"html/semantics/scripting-1/the-script-element/script-charset-03.html": [
|
||||
{
|
||||
"path": "html/semantics/scripting-1/the-script-element/script-charset-03.html",
|
||||
"url": "/html/semantics/scripting-1/the-script-element/script-charset-03.html"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"reftest_nodes": {}
|
||||
},
|
||||
"reftest_nodes": {
|
||||
|
|
|
@ -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