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 "content/browser/background_sync/background_sync_manager.h" | 5 #include "content/browser/background_sync/background_sync_manager.h" |
6 | 6 |
7 #include <stdint.h> | 7 #include <stdint.h> |
8 | 8 |
9 #include <memory> | 9 #include <memory> |
10 #include <utility> | 10 #include <utility> |
11 | 11 |
12 #include "base/files/scoped_temp_dir.h" | 12 #include "base/files/scoped_temp_dir.h" |
13 #include "base/location.h" | 13 #include "base/location.h" |
14 #include "base/logging.h" | 14 #include "base/logging.h" |
15 #include "base/macros.h" | 15 #include "base/macros.h" |
16 #include "base/memory/ptr_util.h" | 16 #include "base/memory/ptr_util.h" |
17 #include "base/metrics/field_trial.h" | 17 #include "base/metrics/field_trial.h" |
18 #include "base/run_loop.h" | 18 #include "base/run_loop.h" |
19 #include "base/single_thread_task_runner.h" | 19 #include "base/single_thread_task_runner.h" |
20 #include "base/test/mock_entropy_provider.h" | 20 #include "base/test/mock_entropy_provider.h" |
21 #include "base/test/simple_test_clock.h" | 21 #include "base/test/simple_test_clock.h" |
22 #include "base/thread_task_runner_handle.h" | 22 #include "base/threading/thread_task_runner_handle.h" |
23 #include "content/browser/background_sync/background_sync_network_observer.h" | 23 #include "content/browser/background_sync/background_sync_network_observer.h" |
24 #include "content/browser/background_sync/background_sync_status.h" | 24 #include "content/browser/background_sync/background_sync_status.h" |
25 #include "content/browser/browser_thread_impl.h" | 25 #include "content/browser/browser_thread_impl.h" |
26 #include "content/browser/service_worker/embedded_worker_test_helper.h" | 26 #include "content/browser/service_worker/embedded_worker_test_helper.h" |
27 #include "content/browser/service_worker/service_worker_context_core.h" | 27 #include "content/browser/service_worker/service_worker_context_core.h" |
28 #include "content/browser/service_worker/service_worker_context_wrapper.h" | 28 #include "content/browser/service_worker/service_worker_context_wrapper.h" |
29 #include "content/browser/service_worker/service_worker_storage.h" | 29 #include "content/browser/service_worker/service_worker_storage.h" |
30 #include "content/browser/storage_partition_impl.h" | 30 #include "content/browser/storage_partition_impl.h" |
31 #include "content/public/browser/background_sync_parameters.h" | 31 #include "content/public/browser/background_sync_parameters.h" |
32 #include "content/public/browser/permission_type.h" | 32 #include "content/public/browser/permission_type.h" |
(...skipping 1281 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1314 // Run it again. | 1314 // Run it again. |
1315 test_clock_->Advance(test_background_sync_manager_->delayed_task_delta()); | 1315 test_clock_->Advance(test_background_sync_manager_->delayed_task_delta()); |
1316 test_background_sync_manager_->delayed_task().Run(); | 1316 test_background_sync_manager_->delayed_task().Run(); |
1317 base::RunLoop().RunUntilIdle(); | 1317 base::RunLoop().RunUntilIdle(); |
1318 EXPECT_FALSE(GetRegistration(sync_options_1_)); | 1318 EXPECT_FALSE(GetRegistration(sync_options_1_)); |
1319 EXPECT_EQ(mojom::BackgroundSyncEventLastChance::IS_LAST_CHANCE, | 1319 EXPECT_EQ(mojom::BackgroundSyncEventLastChance::IS_LAST_CHANCE, |
1320 test_background_sync_manager_->last_chance()); | 1320 test_background_sync_manager_->last_chance()); |
1321 } | 1321 } |
1322 | 1322 |
1323 } // namespace content | 1323 } // namespace content |
OLD | NEW |