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

Unified 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: Merged to trunk Created 6 years, 8 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 side-by-side diff with in-line comments
Download patch
Index: LayoutTests/http/tests/htmlimports/encoding.html
diff --git a/LayoutTests/http/tests/htmlimports/encoding.html b/LayoutTests/http/tests/htmlimports/encoding.html
new file mode 100644
index 0000000000000000000000000000000000000000..a096a1f1736839ea4737b811a10071e41b246234
--- /dev/null
+++ b/LayoutTests/http/tests/htmlimports/encoding.html
@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+<head>
+ <script src="/js-test-resources/js-test.js"></script>
+ <link rel="import" href="resources/no-encoding.cgi">
+ <link rel="import" href="resources/http-encoding.cgi">
+</head>
+<body>
+<script>
+description("Test that UTF-8 decoding is applied appropriately to imports");
+jsTestIsAsync = true;
+window.onload = function() {
+ links = document.querySelectorAll('link[rel=import]');
+ debug("Default encoding should be UTF-8...");
+ shouldBeEqualToString("links[0].import.characterSet", "UTF-8");
+ debug("And Content-Type headers should be ignored...");
+ shouldBeEqualToString("links[1].import.characterSet", "UTF-8");
+ finishJSTest();
+};
+</script>
+</body>
« no previous file with comments | « LayoutTests/fast/html/imports/resources/no-encoding.html ('k') | LayoutTests/http/tests/htmlimports/encoding-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698