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

Unified Diff: components/offline_pages/offline_page_model_impl_unittest.cc

Issue 2023293002: OfflinePageModel cleanups - improved CanSavePage() and moved static kInvalidOfflineId to impl (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: synced Created 4 years, 7 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 | « components/offline_pages/offline_page_model_impl.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/offline_pages/offline_page_model_impl_unittest.cc
diff --git a/components/offline_pages/offline_page_model_impl_unittest.cc b/components/offline_pages/offline_page_model_impl_unittest.cc
index 2c5a437fc950e469a08fc2246b9554ad5bb5f83c..3652c6004ebb732e0cb86a811788928d0f1fc14c 100644
--- a/components/offline_pages/offline_page_model_impl_unittest.cc
+++ b/components/offline_pages/offline_page_model_impl_unittest.cc
@@ -882,13 +882,14 @@ TEST_F(OfflinePageModelImplTest, CheckPagesExistOffline) {
EXPECT_EQ(existing_pages.end(), existing_pages.find(kTestUrl3));
}
-TEST_F(OfflinePageModelImplTest, CanSavePage) {
- EXPECT_TRUE(OfflinePageModel::CanSavePage(GURL("http://foo")));
- EXPECT_TRUE(OfflinePageModel::CanSavePage(GURL("https://foo")));
- EXPECT_FALSE(OfflinePageModel::CanSavePage(GURL("file:///foo")));
- EXPECT_FALSE(OfflinePageModel::CanSavePage(GURL("data:image/png;base64,ab")));
- EXPECT_FALSE(OfflinePageModel::CanSavePage(GURL("chrome://version")));
- EXPECT_FALSE(OfflinePageModel::CanSavePage(GURL("chrome-native://newtab/")));
+TEST_F(OfflinePageModelImplTest, CanSaveURL) {
+ EXPECT_TRUE(OfflinePageModel::CanSaveURL(GURL("http://foo")));
+ EXPECT_TRUE(OfflinePageModel::CanSaveURL(GURL("https://foo")));
+ EXPECT_FALSE(OfflinePageModel::CanSaveURL(GURL("file:///foo")));
+ EXPECT_FALSE(OfflinePageModel::CanSaveURL(GURL("data:image/png;base64,ab")));
+ EXPECT_FALSE(OfflinePageModel::CanSaveURL(GURL("chrome://version")));
+ EXPECT_FALSE(OfflinePageModel::CanSaveURL(GURL("chrome-native://newtab/")));
+ EXPECT_FALSE(OfflinePageModel::CanSaveURL(GURL("/invalid/url.mhtml")));
}
TEST_F(OfflinePageModelImplTest, ClearAll) {
« no previous file with comments | « components/offline_pages/offline_page_model_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698