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

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

Issue 1172303002: Merge page serializers [9/12] (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rename text.txt to empty.txt 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
Index: Source/web/tests/PageSerializerTest.cpp
diff --git a/Source/web/tests/PageSerializerTest.cpp b/Source/web/tests/PageSerializerTest.cpp
index 68887caea8a5d4b820de89949cdd0f0431b31e29..8a3bd73ccb366eafbc998f822e0a8eadb342ff9d 100644
--- a/Source/web/tests/PageSerializerTest.cpp
+++ b/Source/web/tests/PageSerializerTest.cpp
@@ -158,18 +158,45 @@ private:
Vector<SerializedResource> m_resources;
};
-TEST_F(PageSerializerTest, InputImage)
+TEST_F(PageSerializerTest, HTMLElements)
{
- setBaseFolder("pageserializer/input-image/");
+ setBaseFolder("pageserializer/elements/");
- registerURL("input-image.html", "text/html");
- registerURL("button.png", "image/png");
- registerErrorURL("non-existing-button.png", 404);
+ registerURL("elements.html", "text/html");
+ registerURL("style.css", "style.css", "text/css");
+ registerURL("copyright.html", "empty.txt", "text/html");
+ registerURL("script.js", "empty.txt", "text/javascript");
- serialize("input-image.html");
+ registerURL("bodyBackground.png", "image.png", "image/png");
- EXPECT_TRUE(isSerialized("button.png", "image/png"));
- EXPECT_FALSE(isSerialized("non-existing-button.png", "image/png"));
+ registerURL("imageSrc.png", "image.png", "image/png");
+
+ registerURL("inputImage.png", "image.png", "image/png");
+
+ registerURL("tableBackground.png", "image.png", "image/png");
+ registerURL("trBackground.png", "image.png", "image/png");
+ registerURL("tdBackground.png", "image.png", "image/png");
+
+ registerURL("blockquoteCite.html", "empty.txt", "text/html");
+ registerURL("qCite.html", "empty.txt", "text/html");
+ registerURL("delCite.html", "empty.txt", "text/html");
+ registerURL("insCite.html", "empty.txt", "text/html");
+
+ registerErrorURL("nonExisting.png", 404);
+
+ serialize("elements.html");
+
+ EXPECT_EQ(8U, getResources().size());
+
+ EXPECT_TRUE(isSerialized("elements.html", "text/html"));
+ EXPECT_TRUE(isSerialized("style.css", "text/css"));
+ EXPECT_TRUE(isSerialized("bodyBackground.png", "image/png"));
+ EXPECT_TRUE(isSerialized("imageSrc.png", "image/png"));
+ EXPECT_TRUE(isSerialized("inputImage.png", "image/png"));
+ EXPECT_TRUE(isSerialized("tableBackground.png", "image/png"));
+ EXPECT_TRUE(isSerialized("trBackground.png", "image/png"));
+ EXPECT_TRUE(isSerialized("tdBackground.png", "image/png"));
+ EXPECT_FALSE(isSerialized("nonExisting.png", "image/png"));
}
TEST_F(PageSerializerTest, Frames)

Powered by Google App Engine
This is Rietveld 408576698