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

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

Issue 1162833007: Merge page serializers [2/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
Index: Source/web/tests/WebPageNewSerializerTest.cpp
diff --git a/Source/web/tests/WebPageNewSerializerTest.cpp b/Source/web/tests/WebPageNewSerializerTest.cpp
index d4d56a6f37318fe107089d1ff54f0b8cf97ee1af..bc224ddddeac92903fcbde84b8dfbf1c486a935b 100644
--- a/Source/web/tests/WebPageNewSerializerTest.cpp
+++ b/Source/web/tests/WebPageNewSerializerTest.cpp
@@ -435,48 +435,3 @@ TEST_F(WebPageNewSerializeTest, SubFrameSerialization)
}
}
-
-TEST_F(WebPageNewSerializeTest, TestMHTMLEncodingWithDataURL)
-{
- // Load a page with some data urls.
- WebURL topFrameURL = toKURL(m_baseURL);
- registerMockedURLLoad(topFrameURL, WebString::fromUTF8("page_with_data.html"), WebString::fromUTF8("pageserializer/"), htmlMimeType());
- loadURLInTopFrame(topFrameURL);
-
- WebCString mhtmlData = WebPageSerializer::serializeToMHTML(webView());
- ASSERT_FALSE(mhtmlData.isEmpty());
-
- // Read the MHTML data line and check that the string data:image is found
- // exactly one time.
- size_t nbDataURLs = 0;
- LineReader lineReader(std::string(mhtmlData.data()));
- std::string line;
- while (lineReader.getNextLine(&line)) {
- if (line.find("data:image") != std::string::npos)
- nbDataURLs++;
- }
- EXPECT_EQ(1u, nbDataURLs);
-}
-
-
-TEST_F(WebPageNewSerializeTest, TestMHTMLEncodingWithMorphingDataURL)
-{
- // Load a page with some data urls.
- WebURL topFrameURL = toKURL(m_baseURL);
- registerMockedURLLoad(topFrameURL, WebString::fromUTF8("page_with_morphing_data.html"), WebString::fromUTF8("pageserializer/"), htmlMimeType());
- loadURLInTopFrame(topFrameURL);
-
- WebCString mhtmlData = WebPageSerializer::serializeToMHTML(webView());
- ASSERT_FALSE(mhtmlData.isEmpty());
-
- // Read the MHTML data line and check that the string data:image is found
- // exactly two times.
- size_t nbDataURLs = 0;
- LineReader lineReader(std::string(mhtmlData.data()));
- std::string line;
- while (lineReader.getNextLine(&line)) {
- if (line.find("data:text") != std::string::npos)
- nbDataURLs++;
- }
- EXPECT_EQ(2u, nbDataURLs);
-}

Powered by Google App Engine
This is Rietveld 408576698