| OLD | NEW |
| 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 Loading... |
| 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 |
| OLD | NEW |