OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_registration.h" | 5 #include "content/browser/service_worker/service_worker_registration.h" |
6 | 6 |
7 #include <stdint.h> | 7 #include <stdint.h> |
8 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "base/files/scoped_temp_dir.h" | 10 #include "base/files/scoped_temp_dir.h" |
11 #include "base/logging.h" | 11 #include "base/logging.h" |
12 #include "base/run_loop.h" | 12 #include "base/run_loop.h" |
13 #include "base/thread_task_runner_handle.h" | 13 #include "base/threading/thread_task_runner_handle.h" |
14 #include "content/browser/service_worker/embedded_worker_test_helper.h" | 14 #include "content/browser/service_worker/embedded_worker_test_helper.h" |
15 #include "content/browser/service_worker/service_worker_context_core.h" | 15 #include "content/browser/service_worker/service_worker_context_core.h" |
16 #include "content/browser/service_worker/service_worker_registration_handle.h" | 16 #include "content/browser/service_worker/service_worker_registration_handle.h" |
17 #include "content/public/test/test_browser_thread_bundle.h" | 17 #include "content/public/test/test_browser_thread_bundle.h" |
18 #include "testing/gtest/include/gtest/gtest.h" | 18 #include "testing/gtest/include/gtest/gtest.h" |
19 #include "url/gurl.h" | 19 #include "url/gurl.h" |
20 | 20 |
21 namespace content { | 21 namespace content { |
22 | 22 |
23 class ServiceWorkerRegistrationTest : public testing::Test { | 23 class ServiceWorkerRegistrationTest : public testing::Test { |
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
154 context()->AsWeakPtr()); | 154 context()->AsWeakPtr()); |
155 std::unique_ptr<ServiceWorkerRegistrationHandle> handle( | 155 std::unique_ptr<ServiceWorkerRegistrationHandle> handle( |
156 new ServiceWorkerRegistrationHandle( | 156 new ServiceWorkerRegistrationHandle( |
157 context()->AsWeakPtr(), base::WeakPtr<ServiceWorkerProviderHost>(), | 157 context()->AsWeakPtr(), base::WeakPtr<ServiceWorkerProviderHost>(), |
158 registration.get())); | 158 registration.get())); |
159 registration->NotifyRegistrationFailed(); | 159 registration->NotifyRegistrationFailed(); |
160 // Don't crash when handle gets destructed. | 160 // Don't crash when handle gets destructed. |
161 } | 161 } |
162 | 162 |
163 } // namespace content | 163 } // namespace content |
OLD | NEW |