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 "base/files/scoped_temp_dir.h" | 5 #include "base/files/scoped_temp_dir.h" |
6 #include "base/logging.h" | 6 #include "base/logging.h" |
7 #include "base/run_loop.h" | 7 #include "base/run_loop.h" |
8 #include "content/browser/browser_thread_impl.h" | 8 #include "content/browser/browser_thread_impl.h" |
9 #include "content/browser/service_worker/embedded_worker_registry.h" | 9 #include "content/browser/service_worker/embedded_worker_registry.h" |
10 #include "content/browser/service_worker/embedded_worker_test_helper.h" | 10 #include "content/browser/service_worker/embedded_worker_test_helper.h" |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
75 scoped_refptr<ServiceWorkerRegistration>* registration) { | 75 scoped_refptr<ServiceWorkerRegistration>* registration) { |
76 *called = false; | 76 *called = false; |
77 return base::Bind(&SaveFoundRegistrationCallback, | 77 return base::Bind(&SaveFoundRegistrationCallback, |
78 expected_status, | 78 expected_status, |
79 called, | 79 called, |
80 registration); | 80 registration); |
81 } | 81 } |
82 | 82 |
83 void SaveUnregistrationCallback(ServiceWorkerStatusCode expected_status, | 83 void SaveUnregistrationCallback(ServiceWorkerStatusCode expected_status, |
84 bool* called, | 84 bool* called, |
| 85 int64 registration_id, |
85 ServiceWorkerStatusCode status) { | 86 ServiceWorkerStatusCode status) { |
86 EXPECT_EQ(expected_status, status); | 87 EXPECT_EQ(expected_status, status); |
87 *called = true; | 88 *called = true; |
88 } | 89 } |
89 | 90 |
90 ServiceWorkerUnregisterJob::UnregistrationCallback SaveUnregistration( | 91 ServiceWorkerUnregisterJob::UnregistrationCallback SaveUnregistration( |
91 ServiceWorkerStatusCode expected_status, | 92 ServiceWorkerStatusCode expected_status, |
92 bool* called) { | 93 bool* called) { |
93 *called = false; | 94 *called = false; |
94 return base::Bind(&SaveUnregistrationCallback, expected_status, called); | 95 return base::Bind(&SaveUnregistrationCallback, expected_status, called); |
(...skipping 1103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1198 EXPECT_TRUE(called); | 1199 EXPECT_TRUE(called); |
1199 | 1200 |
1200 // Verify the registration was not modified by the Update. | 1201 // Verify the registration was not modified by the Update. |
1201 EXPECT_TRUE(registration->is_uninstalling()); | 1202 EXPECT_TRUE(registration->is_uninstalling()); |
1202 EXPECT_EQ(active_version, registration->active_version()); | 1203 EXPECT_EQ(active_version, registration->active_version()); |
1203 EXPECT_EQ(NULL, registration->waiting_version()); | 1204 EXPECT_EQ(NULL, registration->waiting_version()); |
1204 EXPECT_EQ(NULL, registration->installing_version()); | 1205 EXPECT_EQ(NULL, registration->installing_version()); |
1205 } | 1206 } |
1206 | 1207 |
1207 } // namespace content | 1208 } // namespace content |
OLD | NEW |