| <script src="../../resources/js-test-pre.js"></script> |
| description("First load a script with a wrong charset then again with the right one. Second attempt should work and 'scriptSuccess' should be set to true. 'successfullyParsed' will be undefined."); |
| function appendScriptWithCharset(charset, onload) |
| var script = document.createElement("script"); |
| script.src = "resources/success.js"; |
| script.setAttribute("charset", charset); |
| document.body.appendChild(script); |
| appendScriptWithCharset("utf-16", function () { |
| appendScriptWithCharset("utf-8", function () { |
| shouldBeTrue("scriptSuccess"); |
| <script src="../../resources/js-test-post.js"></script> |