diff options
author | Matt A. Tobin <mattatobin@localhost.localdomain> | 2018-02-02 04:16:08 -0500 |
---|---|---|
committer | Matt A. Tobin <mattatobin@localhost.localdomain> | 2018-02-02 04:16:08 -0500 |
commit | 5f8de423f190bbb79a62f804151bc24824fa32d8 (patch) | |
tree | 10027f336435511475e392454359edea8e25895d /testing/web-platform/tests/html/semantics/scripting-1/the-script-element/script-charset-02.html | |
parent | 49ee0794b5d912db1f95dce6eb52d781dc210db5 (diff) | |
download | UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.gz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.lz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.xz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.zip |
Add m-esr52 at 52.6.0
Diffstat (limited to 'testing/web-platform/tests/html/semantics/scripting-1/the-script-element/script-charset-02.html')
-rw-r--r-- | testing/web-platform/tests/html/semantics/scripting-1/the-script-element/script-charset-02.html | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/testing/web-platform/tests/html/semantics/scripting-1/the-script-element/script-charset-02.html b/testing/web-platform/tests/html/semantics/scripting-1/the-script-element/script-charset-02.html new file mode 100644 index 000000000..77a015bb7 --- /dev/null +++ b/testing/web-platform/tests/html/semantics/scripting-1/the-script-element/script-charset-02.html @@ -0,0 +1,40 @@ +<!DOCTYPE html> +<head> + <!-- TODO: + askalski: while this test pass, it does not test anything now. + It should test, whether with no document.charset set in any way, the + external scripts will get decoded using utf-8 as fallback character encoding. + It seems like utf-8 is also a fallback encoding to html (my guess), so + the part of the code I was attempting to test is never reached. + --> + <title>Script @type: unknown parameters</title> + <link rel="author" title="askalski" href="github.com/askalski"> + <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> + + <!-- test of step4, which is taking utf-8 as fallback --> + <!-- in this case, neither response's Content Type nor charset attribute bring correct charset information. + Furthermore, document's encoding is not set.--> + <script type="text/javascript" + src="serve-with-content-type.py?fn=external-script-windows1250.js&ct=text/javascript"> + </script> + <script> + test(function() { + //these strings should not match, since the tested file is in windows-1250, and fallback is defined as utf-8 + assert_not_equals(window.getSomeString().length, 5); + }); + </script> + + <script type="text/javascript" + src="serve-with-content-type.py?fn=external-script-utf8.js&ct=text/javascript"> + </script> + <script> + //these strings should match, since fallback utf-8 is the correct setting. + test(function() { + assert_equals(window.getSomeString().length, 5); + }); + </script> + +</head> |