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

Unified Diff: third_party/WebKit/Source/web/tests/MHTMLTest.cpp

Issue 2247063002: Allow loading MHTML archive from content scheme (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Move checks into a helper function Created 4 years, 4 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 | « third_party/WebKit/Source/platform/mhtml/MHTMLArchive.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/web/tests/MHTMLTest.cpp
diff --git a/third_party/WebKit/Source/web/tests/MHTMLTest.cpp b/third_party/WebKit/Source/web/tests/MHTMLTest.cpp
index 57d252c88d69dbe7850e2e85ad1963376b48a2f6..08a8ce2eb1b5c0c878501ceadde738d77570bf78 100644
--- a/third_party/WebKit/Source/web/tests/MHTMLTest.cpp
+++ b/third_party/WebKit/Source/web/tests/MHTMLTest.cpp
@@ -241,11 +241,17 @@ TEST_F(MHTMLTest, MHTMLFromScheme)
addTestResources();
RefPtr<SharedBuffer> data = serialize("Test Serialization", "text/html", MHTMLArchive::UseDefaultEncoding);
KURL httpURL = toKURL("http://www.example.com");
+ KURL contentURL = toKURL("content://foo");
KURL fileURL = toKURL("file://foo");
KURL specialSchemeURL = toKURL("fooscheme://bar");
- // MHTMLArchives can only be initialized from local schemes and http/https schemes.
+ // MHTMLArchives can only be initialized from local schemes, http/https schemes, and content scheme(Android specific).
EXPECT_NE(nullptr, MHTMLArchive::create(httpURL, data.get()));
+#if OS(ANDROID)
+ EXPECT_NE(nullptr, MHTMLArchive::create(contentURL, data.get()));
+#else
+ EXPECT_EQ(nullptr, MHTMLArchive::create(contentURL, data.get()));
+#endif
EXPECT_NE(nullptr, MHTMLArchive::create(fileURL, data.get()));
EXPECT_EQ(nullptr, MHTMLArchive::create(specialSchemeURL, data.get()));
SchemeRegistry::registerURLSchemeAsLocal("fooscheme");
« no previous file with comments | « third_party/WebKit/Source/platform/mhtml/MHTMLArchive.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698