| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/service_worker/service_worker_provider_host.h" | 5 #include "content/browser/service_worker/service_worker_provider_host.h" |
| 6 | 6 |
| 7 #include "base/macros.h" | 7 #include "base/macros.h" |
| 8 #include "base/memory/ptr_util.h" | 8 #include "base/memory/ptr_util.h" |
| 9 #include "base/memory/weak_ptr.h" | 9 #include "base/memory/weak_ptr.h" |
| 10 #include "base/thread_task_runner_handle.h" | 10 #include "base/threading/thread_task_runner_handle.h" |
| 11 #include "content/browser/service_worker/embedded_worker_test_helper.h" | 11 #include "content/browser/service_worker/embedded_worker_test_helper.h" |
| 12 #include "content/browser/service_worker/service_worker_context_core.h" | 12 #include "content/browser/service_worker/service_worker_context_core.h" |
| 13 #include "content/browser/service_worker/service_worker_register_job.h" | 13 #include "content/browser/service_worker/service_worker_register_job.h" |
| 14 #include "content/browser/service_worker/service_worker_registration.h" | 14 #include "content/browser/service_worker/service_worker_registration.h" |
| 15 #include "content/browser/service_worker/service_worker_version.h" | 15 #include "content/browser/service_worker/service_worker_version.h" |
| 16 #include "content/public/test/test_browser_thread_bundle.h" | 16 #include "content/public/test/test_browser_thread_bundle.h" |
| 17 #include "testing/gtest/include/gtest/gtest.h" | 17 #include "testing/gtest/include/gtest/gtest.h" |
| 18 | 18 |
| 19 namespace content { | 19 namespace content { |
| 20 | 20 |
| (...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 122 ASSERT_EQ(provider_host1_->MatchRegistration(), registration2_); | 122 ASSERT_EQ(provider_host1_->MatchRegistration(), registration2_); |
| 123 provider_host1_->RemoveMatchingRegistration(registration2_.get()); | 123 provider_host1_->RemoveMatchingRegistration(registration2_.get()); |
| 124 ASSERT_EQ(provider_host1_->MatchRegistration(), registration1_); | 124 ASSERT_EQ(provider_host1_->MatchRegistration(), registration1_); |
| 125 | 125 |
| 126 // Should return nullptr after removing all matching registrations. | 126 // Should return nullptr after removing all matching registrations. |
| 127 provider_host1_->RemoveMatchingRegistration(registration1_.get()); | 127 provider_host1_->RemoveMatchingRegistration(registration1_.get()); |
| 128 ASSERT_EQ(provider_host1_->MatchRegistration(), nullptr); | 128 ASSERT_EQ(provider_host1_->MatchRegistration(), nullptr); |
| 129 } | 129 } |
| 130 | 130 |
| 131 } // namespace content | 131 } // namespace content |
| OLD | NEW |