Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5)

Side by Side Diff: third_party/WebKit/LayoutTests/external/wpt/html/semantics/scripting-1/the-script-element/script-charset-02.html

Issue 2648173006: Import wpt@cf62b859e6b890abc34f8140d185ba91df95c5b6 (Closed)
Patch Set: Rebased Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <head>
3 <!-- TODO:
4 askalski: while this test pass, it does not test anything now.
5 It should test, whether with no document.charset set in any way, the
6 external scripts will get decoded using utf-8 as fallback character encoding.
7 It seems like utf-8 is also a fallback encoding to html (my guess), so
8 the part of the code I was attempting to test is never reached.
9 -->
10 <title>Script @type: unknown parameters</title>
11 <link rel="author" title="askalski" href="github.com/askalski">
12 <link rel="help" href="https://html.spec.whatwg.org/multipage/#scriptingLangua ges">
13 <script src="/resources/testharness.js"></script>
14 <script src="/resources/testharnessreport.js"></script>
15 <div id="log"></div>
16
17 <!-- test of step4, which is taking utf-8 as fallback -->
18 <!-- in this case, neither response's Content Type nor charset attribute bring correct charset information.
19 Furthermore, document's encoding is not set.-->
20 <script type="text/javascript"
21 src="serve-with-content-type.py?fn=external-script-windows1250.js&ct=text/ja vascript">
22 </script>
23 <script>
24 test(function() {
25 //these strings should not match, since the tested file is in windows-1250, and fallback is defined as utf-8
26 assert_not_equals(window.getSomeString().length, 5);
27 });
28 </script>
29
30 <script type="text/javascript"
31 src="serve-with-content-type.py?fn=external-script-utf8.js&ct=text/javascrip t">
32 </script>
33 <script>
34 //these strings should match, since fallback utf-8 is the correct setting.
35 test(function() {
36 assert_equals(window.getSomeString().length, 5);
37 });
38 </script>
39
40 </head>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698