Index: third_party/WebKit/Source/web/tests/PageSerializerTest.cpp |
diff --git a/third_party/WebKit/Source/web/tests/PageSerializerTest.cpp b/third_party/WebKit/Source/web/tests/PageSerializerTest.cpp |
index c882e0eb00fb0eb2485d1a122cc6bf9f4b05982a..640764486a589b77117ae708b35a4f9d6da5686e 100644 |
--- a/third_party/WebKit/Source/web/tests/PageSerializerTest.cpp |
+++ b/third_party/WebKit/Source/web/tests/PageSerializerTest.cpp |
@@ -339,6 +339,12 @@ TEST_F(PageSerializerTest, CSS) |
EXPECT_TRUE(isSerialized("ul-dot.png", "image/png")); |
EXPECT_TRUE(isSerialized("ol-dot.png", "image/png")); |
+ // Ensure encodings are specified. |
+ EXPECT_TRUE(getSerializedData("link_styles.css", "text/css").startsWith("@charset \"windows-1252\";")); |
yosin_UTC9
2015/10/28 00:14:57
Does this work systems uses non-US locale? I'm not
jsbell
2015/10/28 18:16:55
Pretty sure it does; most of the Web is defined as
yosin_UTC9
2015/10/30 01:57:01
Since value of @charset for no @charset case isn't
|
+ EXPECT_TRUE(getSerializedData("import_styles.css", "text/css").startsWith("@charset \"windows-1252\";")); |
+ EXPECT_TRUE(getSerializedData("import_style_from_link.css", "text/css").startsWith("@charset \"windows-1252\";")); |
+ EXPECT_TRUE(getSerializedData("encoding.css", "text/css").startsWith("@charset \"euc-kr\";")); |
+ |
// Ensure that stylesheet contents are not NFC-normalized before encoding. |
EXPECT_TRUE(getSerializedData("encoding.css", "text/css").contains("\xE4\xC5\xD1\xE2")); |
EXPECT_FALSE(getSerializedData("encoding.css", "text/css").contains("\xE4\xC5\xE4\xC5")); |