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/embedded_worker_instance.h" | 5 #include "content/browser/service_worker/embedded_worker_instance.h" |
6 | 6 |
7 #include <stdint.h> | 7 #include <stdint.h> |
8 #include <utility> | 8 #include <utility> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
110 params->service_worker_version_id = version_id; | 110 params->service_worker_version_id = version_id; |
111 params->scope = scope; | 111 params->scope = scope; |
112 params->script_url = script_url; | 112 params->script_url = script_url; |
113 params->pause_after_download = false; | 113 params->pause_after_download = false; |
114 params->is_installed = false; | 114 params->is_installed = false; |
115 return params; | 115 return params; |
116 } | 116 } |
117 | 117 |
118 mojom::ServiceWorkerEventDispatcherRequest CreateEventDispatcher() { | 118 mojom::ServiceWorkerEventDispatcherRequest CreateEventDispatcher() { |
119 dispatchers_.emplace_back(); | 119 dispatchers_.emplace_back(); |
120 return mojo::GetProxy(&dispatchers_.back()); | 120 return mojo::MakeRequest(&dispatchers_.back()); |
121 } | 121 } |
122 | 122 |
123 ServiceWorkerContextCore* context() { return helper_->context(); } | 123 ServiceWorkerContextCore* context() { return helper_->context(); } |
124 | 124 |
125 EmbeddedWorkerRegistry* embedded_worker_registry() { | 125 EmbeddedWorkerRegistry* embedded_worker_registry() { |
126 DCHECK(context()); | 126 DCHECK(context()); |
127 return context()->embedded_worker_registry(); | 127 return context()->embedded_worker_registry(); |
128 } | 128 } |
129 | 129 |
130 IPC::TestSink* ipc_sink() { return helper_->ipc_sink(); } | 130 IPC::TestSink* ipc_sink() { return helper_->ipc_sink(); } |
(...skipping 644 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
775 EXPECT_EQ(START_WORKER_MESSAGE_SENT, events_[1].type); | 775 EXPECT_EQ(START_WORKER_MESSAGE_SENT, events_[1].type); |
776 EXPECT_EQ(DETACHED, events_[2].type); | 776 EXPECT_EQ(DETACHED, events_[2].type); |
777 EXPECT_EQ(EmbeddedWorkerStatus::STARTING, events_[2].status); | 777 EXPECT_EQ(EmbeddedWorkerStatus::STARTING, events_[2].status); |
778 } | 778 } |
779 | 779 |
780 INSTANTIATE_TEST_CASE_P(EmbeddedWorkerInstanceTest, | 780 INSTANTIATE_TEST_CASE_P(EmbeddedWorkerInstanceTest, |
781 EmbeddedWorkerInstanceTestP, | 781 EmbeddedWorkerInstanceTestP, |
782 ::testing::Values(false, true)); | 782 ::testing::Values(false, true)); |
783 | 783 |
784 } // namespace content | 784 } // namespace content |
OLD | NEW |