| 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 <stdint.h> | 5 #include <stdint.h> |
| 6 | 6 |
| 7 #include "base/macros.h" | 7 #include "base/macros.h" |
| 8 #include "base/run_loop.h" | 8 #include "base/run_loop.h" |
| 9 #include "content/browser/message_port_service.h" | 9 #include "content/browser/message_port_service.h" |
| 10 #include "content/browser/service_worker/embedded_worker_registry.h" | 10 #include "content/browser/service_worker/embedded_worker_registry.h" |
| (...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 165 class TestMojoServiceImpl : public TestMojoService { | 165 class TestMojoServiceImpl : public TestMojoService { |
| 166 public: | 166 public: |
| 167 static void Create(mojo::InterfaceRequest<TestMojoService> request) { | 167 static void Create(mojo::InterfaceRequest<TestMojoService> request) { |
| 168 new TestMojoServiceImpl(std::move(request)); | 168 new TestMojoServiceImpl(std::move(request)); |
| 169 } | 169 } |
| 170 | 170 |
| 171 void DoSomething(const DoSomethingCallback& callback) override { | 171 void DoSomething(const DoSomethingCallback& callback) override { |
| 172 callback.Run(); | 172 callback.Run(); |
| 173 } | 173 } |
| 174 | 174 |
| 175 void GetRequestorURL(const GetRequestorURLCallback& callback) override { | 175 void GetRequestorName(const GetRequestorNameCallback& callback) override { |
| 176 callback.Run(mojo::String("")); | 176 callback.Run(mojo::String("")); |
| 177 } | 177 } |
| 178 | 178 |
| 179 private: | 179 private: |
| 180 explicit TestMojoServiceImpl(mojo::InterfaceRequest<TestMojoService> request) | 180 explicit TestMojoServiceImpl(mojo::InterfaceRequest<TestMojoService> request) |
| 181 : binding_(this, std::move(request)) {} | 181 : binding_(this, std::move(request)) {} |
| 182 | 182 |
| 183 mojo::StrongBinding<TestMojoService> binding_; | 183 mojo::StrongBinding<TestMojoService> binding_; |
| 184 }; | 184 }; |
| 185 | 185 |
| (...skipping 1270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1456 helper_->SimulateSendSimpleEventResult( | 1456 helper_->SimulateSendSimpleEventResult( |
| 1457 version_->embedded_worker()->embedded_worker_id(), request_id, | 1457 version_->embedded_worker()->embedded_worker_id(), request_id, |
| 1458 blink::WebServiceWorkerEventResultRejected); | 1458 blink::WebServiceWorkerEventResultRejected); |
| 1459 runner->Run(); | 1459 runner->Run(); |
| 1460 | 1460 |
| 1461 // Verify callback was called with correct status. | 1461 // Verify callback was called with correct status. |
| 1462 EXPECT_EQ(SERVICE_WORKER_ERROR_EVENT_WAITUNTIL_REJECTED, status); | 1462 EXPECT_EQ(SERVICE_WORKER_ERROR_EVENT_WAITUNTIL_REJECTED, status); |
| 1463 } | 1463 } |
| 1464 | 1464 |
| 1465 } // namespace content | 1465 } // namespace content |
| OLD | NEW |