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

Side by Side Diff: LayoutTests/http/tests/htmlimports/encoding.html

Issue 178883002: Set encoding to UTF-8 for HTML Imports if no encoding is specified in the HTTP response (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 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 | Annotate | Revision Log
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <head>
3 <script src="/js-test-resources/js-test.js"></script>
4 <link rel="import" href="resources/no-encoding.cgi">
5 <link rel="import" href="resources/http-encoding.cgi">
6 <link rel="import" href="resources/bogus-encoding.cgi">
7 </head>
8 <body>
9 <script>
10 description("Test that UTF-8 decoding is applied appropriately to imports");
11 jsTestIsAsync = true;
12 window.onload = function() {
13 links = document.querySelectorAll('link[rel=import]');
14 debug("Default encoding should be UTF-8...");
15 shouldBeEqualToString("links[0].import.characterSet", "UTF-8");
16 debug("But a charset in the Content-Type HTTP header should override it...") ;
17 shouldBeEqualToString("links[1].import.characterSet", "EUC-JP");
18 // FIXME: This is probably the wrong behavior
19 debug("Any non-empty charset takes precedence, which means we sometimes fall back to sniffing...");
20 shouldBeEqualToString("links[2].import.characterSet", "ISO-8859-1");
21 finishJSTest();
22 };
23 </script>
24 </body>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698