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

Unified Diff: components/previews/core/previews_experiments_unittest.cc

Issue 2870263004: Add an about:flag to enable client-side LoFi (Closed)
Patch Set: Created 3 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/previews/core/previews_experiments.cc ('k') | components/previews/core/previews_features.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/previews/core/previews_experiments_unittest.cc
diff --git a/components/previews/core/previews_experiments_unittest.cc b/components/previews/core/previews_experiments_unittest.cc
index 5395a2568990a273800f70b4aa29db55e3919b71..bc5efb819cfe1bc4bff924ebd3f70a1f7ef8e077 100644
--- a/components/previews/core/previews_experiments_unittest.cc
+++ b/components/previews/core/previews_experiments_unittest.cc
@@ -166,6 +166,22 @@ TEST(PreviewsExperimentsTest, TestEnableClientLoFiWithCustomParams) {
variations::testing::ClearAllVariationParams();
}
+// Verifies that we can enable offline previews via comand line.
+TEST(PreviewsExperimentsTest, TestCommandLineClientLoFi) {
+ EXPECT_FALSE(params::IsClientLoFiEnabled());
+
+ std::unique_ptr<base::FeatureList> feature_list =
+ base::MakeUnique<base::FeatureList>();
+
+ // The feature is explicitly enabled on the command-line.
+ feature_list->InitializeFromCommandLine("ClientLoFi", "");
+ base::FeatureList::ClearInstanceForTesting();
+ base::FeatureList::SetInstance(std::move(feature_list));
+
+ EXPECT_TRUE(params::IsClientLoFiEnabled());
+ base::FeatureList::ClearInstanceForTesting();
+}
+
} // namespace
} // namespace previews
« no previous file with comments | « components/previews/core/previews_experiments.cc ('k') | components/previews/core/previews_features.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698