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

Unified Diff: components/offline_pages/core/offline_page_model_impl_unittest.cc

Issue 2841223003: [Offline Pages] Remove dependencies from particular namespaces in tests. (Closed)
Patch Set: Created 3 years, 8 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 | components/offline_pages/core/offline_page_storage_manager_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/offline_pages/core/offline_page_model_impl_unittest.cc
diff --git a/components/offline_pages/core/offline_page_model_impl_unittest.cc b/components/offline_pages/core/offline_page_model_impl_unittest.cc
index 8d20e475263a86edf80249c8ab02fc702a2893f6..826638232cae804ab86532093384c83f1d170924 100644
--- a/components/offline_pages/core/offline_page_model_impl_unittest.cc
+++ b/components/offline_pages/core/offline_page_model_impl_unittest.cc
@@ -39,6 +39,7 @@
namespace offline_pages {
namespace {
+const char kOriginalTabNamespace[] = "original_tab_testing_namespace";
const char kTestClientNamespace[] = "default";
const char kUserRequestedNamespace[] = "download";
const GURL kTestUrl("http://example.com");
@@ -224,6 +225,14 @@ OfflinePageModelImplTest::~OfflinePageModelImplTest() {}
void OfflinePageModelImplTest::SetUp() {
ASSERT_TRUE(temp_dir_.CreateUniqueTempDir());
model_ = BuildModel(BuildStore());
+ model_->GetPolicyController()->AddPolicyForTest(
+ kOriginalTabNamespace,
+ OfflinePageClientPolicyBuilder(
+ kOriginalTabNamespace,
+ offline_pages::LifetimePolicy::LifetimeType::TEMPORARY,
+ kUnlimitedPages, kUnlimitedPages)
+ .SetIsOnlyShownInOriginalTab(true));
+
model_->AddObserver(this);
PumpLoop();
}
@@ -1033,9 +1042,7 @@ TEST_F(OfflinePageModelImplTest, CheckPagesExistOffline) {
SavePage(kTestUrl, kTestClientId1);
SavePage(kTestUrl2, kTestClientId2);
- // TODO(dewittj): Remove the "Last N" restriction in favor of a better query
- // interface. See https://crbug.com/622763 for information.
- const ClientId last_n_client_id(kLastNNamespace, "1234");
+ const ClientId last_n_client_id(kOriginalTabNamespace, "1234");
SavePage(kTestUrl3, last_n_client_id);
std::set<GURL> input;
« no previous file with comments | « no previous file | components/offline_pages/core/offline_page_storage_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698