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

Unified Diff: chrome/browser/android/offline_pages/offline_page_utils_unittest.cc

Issue 1899433002: Update flags used by offline pages and bookmarks (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
Index: chrome/browser/android/offline_pages/offline_page_utils_unittest.cc
diff --git a/chrome/browser/android/offline_pages/offline_page_utils_unittest.cc b/chrome/browser/android/offline_pages/offline_page_utils_unittest.cc
index 67bc0ca1978592a47f3c24beee131d45c3390189..4832ddd47fc08e5798a7aeea24f9954bd1da2b93 100644
--- a/chrome/browser/android/offline_pages/offline_page_utils_unittest.cc
+++ b/chrome/browser/android/offline_pages/offline_page_utils_unittest.cc
@@ -9,6 +9,7 @@
#include "base/callback.h"
#include "base/command_line.h"
+#include "base/feature_list.h"
#include "base/files/file.h"
#include "base/files/file_path.h"
#include "base/files/file_util.h"
@@ -18,8 +19,8 @@
#include "chrome/browser/android/offline_pages/test_offline_page_model_builder.h"
#include "chrome/common/chrome_constants.h"
#include "chrome/test/base/testing_profile.h"
+#include "components/offline_pages/offline_page_feature.h"
#include "components/offline_pages/offline_page_model.h"
-#include "components/offline_pages/offline_page_switches.h"
#include "components/offline_pages/offline_page_test_archiver.h"
#include "components/offline_pages/offline_page_test_store.h"
#include "components/offline_pages/proto/offline_pages.pb.h"
@@ -97,8 +98,11 @@ OfflinePageUtilsTest::~OfflinePageUtilsTest() {}
void OfflinePageUtilsTest::SetUp() {
// Enables offline pages feature.
// TODO(jianli): Remove this once the feature is completely enabled.
- base::CommandLine::ForCurrentProcess()->AppendSwitch(
- switches::kEnableOfflinePages);
+ base::FeatureList::ClearInstanceForTesting();
+ scoped_ptr<base::FeatureList> feature_list(new base::FeatureList);
+ feature_list->InitializeFromCommandLine(
+ offline_pages::kOfflineBookmarksFeature.name, "");
+ base::FeatureList::SetInstance(std::move(feature_list));
// Set up the factory for testing.
OfflinePageModelFactory::GetInstance()->SetTestingFactoryAndUse(

Powered by Google App Engine
This is Rietveld 408576698