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/core/offline_page_model_impl.h" | 5 #include "components/offline_pages/core/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 652 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
663 TEST_F(OfflinePageModelImplTest, SavePageOnBackground) { | 663 TEST_F(OfflinePageModelImplTest, SavePageOnBackground) { |
664 std::unique_ptr<OfflinePageTestArchiver> archiver(BuildArchiver( | 664 std::unique_ptr<OfflinePageTestArchiver> archiver(BuildArchiver( |
665 kTestUrl, OfflinePageArchiver::ArchiverResult::SUCCESSFULLY_CREATED)); | 665 kTestUrl, OfflinePageArchiver::ArchiverResult::SUCCESSFULLY_CREATED)); |
666 // archiver_ptr will be valid until after first PumpLoop() is called. | 666 // archiver_ptr will be valid until after first PumpLoop() is called. |
667 OfflinePageTestArchiver* archiver_ptr = archiver.get(); | 667 OfflinePageTestArchiver* archiver_ptr = archiver.get(); |
668 | 668 |
669 OfflinePageModel::SavePageParams save_page_params; | 669 OfflinePageModel::SavePageParams save_page_params; |
670 save_page_params.url = kTestUrl; | 670 save_page_params.url = kTestUrl; |
671 save_page_params.client_id = kTestClientId1; | 671 save_page_params.client_id = kTestClientId1; |
672 save_page_params.is_background = true; | 672 save_page_params.is_background = true; |
| 673 save_page_params.use_page_problem_detectors = false; |
673 SavePageWithParamsAsync(save_page_params, std::move(archiver)); | 674 SavePageWithParamsAsync(save_page_params, std::move(archiver)); |
674 EXPECT_TRUE(archiver_ptr->create_archive_called()); | 675 EXPECT_TRUE(archiver_ptr->create_archive_called()); |
675 // |remove_popup_overlay| should be turned on on background mode. | 676 // |remove_popup_overlay| should be turned on on background mode. |
676 EXPECT_TRUE(archiver_ptr->create_archive_params().remove_popup_overlay); | 677 EXPECT_TRUE(archiver_ptr->create_archive_params().remove_popup_overlay); |
677 | 678 |
678 PumpLoop(); | 679 PumpLoop(); |
679 } | 680 } |
680 | 681 |
681 TEST_F(OfflinePageModelImplTest, MarkPageAccessed) { | 682 TEST_F(OfflinePageModelImplTest, MarkPageAccessed) { |
682 SavePage(kTestUrl, kTestClientId1); | 683 SavePage(kTestUrl, kTestClientId1); |
(...skipping 676 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1359 EXPECT_FALSE(offline_pages::IsOfflinePagesLoadSignalCollectingEnabled()); | 1360 EXPECT_FALSE(offline_pages::IsOfflinePagesLoadSignalCollectingEnabled()); |
1360 | 1361 |
1361 // Check if feature is correctly enabled by command-line flag. | 1362 // Check if feature is correctly enabled by command-line flag. |
1362 base::test::ScopedFeatureList scoped_feature_list; | 1363 base::test::ScopedFeatureList scoped_feature_list; |
1363 scoped_feature_list.InitAndEnableFeature( | 1364 scoped_feature_list.InitAndEnableFeature( |
1364 kOfflinePagesLoadSignalCollectingFeature); | 1365 kOfflinePagesLoadSignalCollectingFeature); |
1365 EXPECT_TRUE(offline_pages::IsOfflinePagesLoadSignalCollectingEnabled()); | 1366 EXPECT_TRUE(offline_pages::IsOfflinePagesLoadSignalCollectingEnabled()); |
1366 } | 1367 } |
1367 | 1368 |
1368 } // namespace offline_pages | 1369 } // namespace offline_pages |
OLD | NEW |