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

Unified Diff: Source/web/tests/PageSerializerTest.cpp

Issue 1177693002: Merge page serializers [6/12] (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 6 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
« no previous file with comments | « no previous file | Source/web/tests/WebPageNewSerializerTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/web/tests/PageSerializerTest.cpp
diff --git a/Source/web/tests/PageSerializerTest.cpp b/Source/web/tests/PageSerializerTest.cpp
index 351bbd3015da0162cde1164bd531dbfaf297febe..fa918f2bc55c56707da969ddc67d0da6a8c82633 100644
--- a/Source/web/tests/PageSerializerTest.cpp
+++ b/Source/web/tests/PageSerializerTest.cpp
@@ -253,6 +253,41 @@ TEST_F(PageSerializerTest, BlankFrames)
EXPECT_TRUE(isSerialized("wyciwyg://frame/2", "text/html"));
}
+TEST_F(PageSerializerTest, CSS)
+{
+ setBaseFolder("pageserializer/css/");
+
+ registerURL("css_test_page.html", "text/html");
+ registerURL("link_styles.css", "text/css");
+ registerURL("import_style_from_link.css", "text/css");
+ registerURL("import_styles.css", "text/css");
+ registerURL("red_background.png", "image.png", "image/png");
+ registerURL("orange_background.png", "image.png", "image/png");
+ registerURL("yellow_background.png", "image.png", "image/png");
+ registerURL("green_background.png", "image.png", "image/png");
+ registerURL("blue_background.png", "image.png", "image/png");
+ registerURL("purple_background.png", "image.png", "image/png");
+ registerURL("ul-dot.png", "image.png", "image/png");
+ registerURL("ol-dot.png", "image.png", "image/png");
+
+ serialize("css_test_page.html");
+
+ EXPECT_EQ(12U, getResources().size());
+
+ EXPECT_TRUE(isSerialized("css_test_page.html", "text/html"));
+ EXPECT_TRUE(isSerialized("link_styles.css", "text/css"));
+ EXPECT_TRUE(isSerialized("import_styles.css", "text/css"));
+ EXPECT_TRUE(isSerialized("import_style_from_link.css", "text/css"));
+ EXPECT_TRUE(isSerialized("red_background.png", "image/png"));
+ EXPECT_TRUE(isSerialized("orange_background.png", "image/png"));
+ EXPECT_TRUE(isSerialized("yellow_background.png", "image/png"));
+ EXPECT_TRUE(isSerialized("green_background.png", "image/png"));
+ EXPECT_TRUE(isSerialized("blue_background.png", "image/png"));
+ EXPECT_TRUE(isSerialized("purple_background.png", "image/png"));
+ EXPECT_TRUE(isSerialized("ul-dot.png", "image/png"));
+ EXPECT_TRUE(isSerialized("ol-dot.png", "image/png"));
+}
+
TEST_F(PageSerializerTest, CSSImport)
{
setBaseFolder("pageserializer/css/");
« no previous file with comments | « no previous file | Source/web/tests/WebPageNewSerializerTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698