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 "base/basictypes.h" | 5 #include "base/basictypes.h" |
6 #include "base/run_loop.h" | 6 #include "base/run_loop.h" |
7 #include "base/stl_util.h" | 7 #include "base/stl_util.h" |
8 #include "content/browser/service_worker/embedded_worker_instance.h" | 8 #include "content/browser/service_worker/embedded_worker_instance.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 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
193 worker->Start( | 193 worker->Start( |
194 1L, | 194 1L, |
195 GURL("http://example.com/*"), | 195 GURL("http://example.com/*"), |
196 GURL("http://example.com/worker.js"), | 196 GURL("http://example.com/worker.js"), |
197 std::vector<int>(), | 197 std::vector<int>(), |
198 base::Bind(&SaveStatusAndCall, &status, run_loop.QuitClosure())); | 198 base::Bind(&SaveStatusAndCall, &status, run_loop.QuitClosure())); |
199 run_loop.Run(); | 199 run_loop.Run(); |
200 EXPECT_EQ(SERVICE_WORKER_OK, status) << ServiceWorkerStatusToString(status); | 200 EXPECT_EQ(SERVICE_WORKER_OK, status) << ServiceWorkerStatusToString(status); |
201 EXPECT_EQ(EmbeddedWorkerInstance::STARTING, worker->status()); | 201 EXPECT_EQ(EmbeddedWorkerInstance::STARTING, worker->status()); |
202 EXPECT_EQ(pid3, worker->process_id()); | 202 EXPECT_EQ(pid3, worker->process_id()); |
| 203 |
| 204 sw_context_wrapper->Shutdown(); |
203 } | 205 } |
204 | 206 |
205 base::RunLoop().RunUntilIdle(); | 207 base::RunLoop().RunUntilIdle(); |
206 } | 208 } |
207 | 209 |
208 } // namespace content | 210 } // namespace content |
OLD | NEW |