| OLD | NEW |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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 <map> | 5 #include <map> |
| 6 #include <memory> | 6 #include <memory> |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/macros.h" | 9 #include "base/macros.h" |
| 10 #include "base/memory/ptr_util.h" | 10 #include "base/memory/ptr_util.h" |
| (...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 133 | 133 |
| 134 service_ = base::MakeUnique<BackgroundFetchServiceImpl>( | 134 service_ = base::MakeUnique<BackgroundFetchServiceImpl>( |
| 135 0 /* render_process_id */, context_); | 135 0 /* render_process_id */, context_); |
| 136 } | 136 } |
| 137 | 137 |
| 138 void TearDown() override { | 138 void TearDown() override { |
| 139 BackgroundFetchTestBase::TearDown(); | 139 BackgroundFetchTestBase::TearDown(); |
| 140 | 140 |
| 141 service_.reset(); | 141 service_.reset(); |
| 142 | 142 |
| 143 context_->Shutdown(); | |
| 144 context_ = nullptr; | 143 context_ = nullptr; |
| 145 | 144 |
| 146 // Give pending shutdown operations a chance to finish. | 145 // Give pending shutdown operations a chance to finish. |
| 147 base::RunLoop().RunUntilIdle(); | 146 base::RunLoop().RunUntilIdle(); |
| 148 } | 147 } |
| 149 | 148 |
| 150 private: | 149 private: |
| 151 void DidGetRegistration( | 150 void DidGetRegistration( |
| 152 base::Closure quit_closure, | 151 base::Closure quit_closure, |
| 153 blink::mojom::BackgroundFetchError* out_error, | 152 blink::mojom::BackgroundFetchError* out_error, |
| (...skipping 550 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 704 const bool has_alternative_tag = | 703 const bool has_alternative_tag = |
| 705 tags[0] == kAlternativeTag || tags[1] == kAlternativeTag; | 704 tags[0] == kAlternativeTag || tags[1] == kAlternativeTag; |
| 706 | 705 |
| 707 EXPECT_TRUE(has_example_tag); | 706 EXPECT_TRUE(has_example_tag); |
| 708 EXPECT_TRUE(has_alternative_tag); | 707 EXPECT_TRUE(has_alternative_tag); |
| 709 } | 708 } |
| 710 } | 709 } |
| 711 | 710 |
| 712 } // namespace | 711 } // namespace |
| 713 } // namespace content | 712 } // namespace content |
| OLD | NEW |