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

Side by Side Diff: components/offline_pages/offline_page_model_impl_unittest.cc

Issue 2483463002: [Offline Pages] Feature flag to allow concurrent background loading on svelte (Closed)
Patch Set: Merge Created 4 years, 1 month 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "components/offline_pages/offline_page_model_impl.h" 5 #include "components/offline_pages/offline_page_model_impl.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 #include <algorithm> 8 #include <algorithm>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 1214 matching lines...) Expand 10 before | Expand all | Expand 10 after
1225 1225
1226 // Check if feature is correctly enabled by command-line flag. 1226 // Check if feature is correctly enabled by command-line flag.
1227 scoped_feature_list.reset(new base::test::ScopedFeatureList); 1227 scoped_feature_list.reset(new base::test::ScopedFeatureList);
1228 scoped_feature_list->InitFromCommandLine( 1228 scoped_feature_list->InitFromCommandLine(
1229 std::string(kOfflineBookmarksFeature.name) + "," + 1229 std::string(kOfflineBookmarksFeature.name) + "," +
1230 kOfflinePagesSharingFeature.name, 1230 kOfflinePagesSharingFeature.name,
1231 ""); 1231 "");
1232 EXPECT_TRUE(offline_pages::IsOfflinePagesSharingEnabled()); 1232 EXPECT_TRUE(offline_pages::IsOfflinePagesSharingEnabled());
1233 } 1233 }
1234 1234
1235 TEST(CommandLineFlagsTest, OfflinePagesSvelteConcurrentLoading) {
1236 // This feature is disabled by default.
1237 EXPECT_FALSE(offline_pages::IsOfflinePagesSvelteConcurrentLoadingEnabled());
1238
1239 // Check if feature is correctly enabled by command-line flag.
1240 base::test::ScopedFeatureList scoped_feature_list;
1241 scoped_feature_list.InitAndEnableFeature(
1242 kOfflinePagesSvelteConcurrentLoadingFeature);
1243 EXPECT_TRUE(offline_pages::IsOfflinePagesSvelteConcurrentLoadingEnabled());
1244 }
1245
1235 } // namespace offline_pages 1246 } // namespace offline_pages
OLDNEW
« no previous file with comments | « components/offline_pages/offline_page_feature.cc ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698