| 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 1233 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 |
| OLD | NEW |