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

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: Added flag to LoginCustomFlags histogram 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 1233 matching lines...) Expand 10 before | Expand all | Expand 10 after
1244 1244
1245 // Check if feature is correctly enabled by command-line flag. 1245 // Check if feature is correctly enabled by command-line flag.
1246 scoped_feature_list.reset(new base::test::ScopedFeatureList); 1246 scoped_feature_list.reset(new base::test::ScopedFeatureList);
1247 scoped_feature_list->InitFromCommandLine( 1247 scoped_feature_list->InitFromCommandLine(
1248 std::string(kOfflineBookmarksFeature.name) + "," + 1248 std::string(kOfflineBookmarksFeature.name) + "," +
1249 kOfflinePagesSharingFeature.name, 1249 kOfflinePagesSharingFeature.name,
1250 ""); 1250 "");
1251 EXPECT_TRUE(offline_pages::IsOfflinePagesSharingEnabled()); 1251 EXPECT_TRUE(offline_pages::IsOfflinePagesSharingEnabled());
1252 } 1252 }
1253 1253
1254 TEST(CommandLineFlagsTest, OfflinePagesSvelteConcurrentLoading) {
1255 // This feature is disabled by default.
1256 EXPECT_FALSE(offline_pages::IsOfflinePagesSvelteConcurrentLoadingEnabled());
1257
1258 // Check if feature is correctly enabled by command-line flag.
1259 base::test::ScopedFeatureList scoped_feature_list;
1260 scoped_feature_list.InitAndEnableFeature(
1261 kOfflinePagesSvelteConcurrentLoadingFeature);
1262 EXPECT_TRUE(offline_pages::IsOfflinePagesSvelteConcurrentLoadingEnabled());
1263 }
1264
1254 } // namespace offline_pages 1265 } // namespace offline_pages
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698