Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(40)

Side by Side Diff: content/browser/service_worker/service_worker_context_unittest.cc

Issue 2490623005: Remove InterfaceRegistry/Provider from service workers (Closed)
Patch Set: rebase/fix comment Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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/public/browser/service_worker_context.h" 5 #include "content/public/browser/service_worker_context.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include "base/files/scoped_temp_dir.h" 9 #include "base/files/scoped_temp_dir.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 172
173 explicit RecordableEmbeddedWorkerInstanceClient( 173 explicit RecordableEmbeddedWorkerInstanceClient(
174 base::WeakPtr<EmbeddedWorkerTestHelper> helper) 174 base::WeakPtr<EmbeddedWorkerTestHelper> helper)
175 : EmbeddedWorkerTestHelper::MockEmbeddedWorkerInstanceClient(helper) {} 175 : EmbeddedWorkerTestHelper::MockEmbeddedWorkerInstanceClient(helper) {}
176 176
177 const std::vector<Message>& events() const { return events_; } 177 const std::vector<Message>& events() const { return events_; }
178 178
179 protected: 179 protected:
180 void StartWorker( 180 void StartWorker(
181 const EmbeddedWorkerStartParams& params, 181 const EmbeddedWorkerStartParams& params,
182 service_manager::mojom::InterfaceProviderPtr browser_interfaces, 182 mojom::ServiceWorkerEventDispatcherRequest request) override {
183 service_manager::mojom::InterfaceProviderRequest renderer_request)
184 override {
185 events_.push_back(Message::StartWorker); 183 events_.push_back(Message::StartWorker);
186 EmbeddedWorkerTestHelper::MockEmbeddedWorkerInstanceClient::StartWorker( 184 EmbeddedWorkerTestHelper::MockEmbeddedWorkerInstanceClient::StartWorker(
187 params, std::move(browser_interfaces), std::move(renderer_request)); 185 params, std::move(request));
188 } 186 }
189 187
190 void StopWorker(const StopWorkerCallback& callback) override { 188 void StopWorker(const StopWorkerCallback& callback) override {
191 events_.push_back(Message::StopWorker); 189 events_.push_back(Message::StopWorker);
192 EmbeddedWorkerTestHelper::MockEmbeddedWorkerInstanceClient::StopWorker( 190 EmbeddedWorkerTestHelper::MockEmbeddedWorkerInstanceClient::StopWorker(
193 std::move(callback)); 191 std::move(callback));
194 } 192 }
195 193
196 std::vector<Message> events_; 194 std::vector<Message> events_;
197 195
(...skipping 617 matching lines...) Expand 10 before | Expand all | Expand 10 after
815 813
816 INSTANTIATE_TEST_CASE_P(ServiceWorkerContextTest, 814 INSTANTIATE_TEST_CASE_P(ServiceWorkerContextTest,
817 ServiceWorkerContextTestP, 815 ServiceWorkerContextTestP,
818 testing::Bool()); 816 testing::Bool());
819 817
820 INSTANTIATE_TEST_CASE_P(ServiceWorkerContextRecoveryTest, 818 INSTANTIATE_TEST_CASE_P(ServiceWorkerContextRecoveryTest,
821 ServiceWorkerContextRecoveryTest, 819 ServiceWorkerContextRecoveryTest,
822 testing::Combine(testing::Bool(), testing::Bool())); 820 testing::Combine(testing::Bool(), testing::Bool()));
823 821
824 } // namespace content 822 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698