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 "extensions/renderer/api_test_base.h" | 5 #include "extensions/renderer/api_test_base.h" |
6 | 6 |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "base/run_loop.h" | 9 #include "base/run_loop.h" |
10 #include "extensions/common/extension_urls.h" | 10 #include "extensions/common/extension_urls.h" |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
89 base::Callback<void(mojo::ScopedMessagePipeHandle)> >::iterator it = | 89 base::Callback<void(mojo::ScopedMessagePipeHandle)> >::iterator it = |
90 service_factories_.find(service_name); | 90 service_factories_.find(service_name); |
91 if (it != service_factories_.end()) | 91 if (it != service_factories_.end()) |
92 it->second.Run(pipe.handle0.Pass()); | 92 it->second.Run(pipe.handle0.Pass()); |
93 return pipe.handle1.release(); | 93 return pipe.handle1.release(); |
94 } | 94 } |
95 | 95 |
96 TestServiceProvider::TestServiceProvider() { | 96 TestServiceProvider::TestServiceProvider() { |
97 } | 97 } |
98 | 98 |
| 99 // static |
| 100 void TestServiceProvider::IgnoreHandle(mojo::ScopedMessagePipeHandle handle) { |
| 101 } |
| 102 |
99 ApiTestBase::ApiTestBase() { | 103 ApiTestBase::ApiTestBase() { |
100 } | 104 } |
101 ApiTestBase::~ApiTestBase() { | 105 ApiTestBase::~ApiTestBase() { |
102 } | 106 } |
103 | 107 |
104 void ApiTestBase::SetUp() { | 108 void ApiTestBase::SetUp() { |
105 ModuleSystemTest::SetUp(); | 109 ModuleSystemTest::SetUp(); |
106 InitializeEnvironment(); | 110 InitializeEnvironment(); |
107 RegisterModules(); | 111 RegisterModules(); |
108 } | 112 } |
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
212 } | 216 } |
213 | 217 |
214 void ApiTestBase::RunPromisesAgain() { | 218 void ApiTestBase::RunPromisesAgain() { |
215 RunResolvedPromises(); | 219 RunResolvedPromises(); |
216 base::MessageLoop::current()->PostTask( | 220 base::MessageLoop::current()->PostTask( |
217 FROM_HERE, | 221 FROM_HERE, |
218 base::Bind(&ApiTestBase::RunPromisesAgain, base::Unretained(this))); | 222 base::Bind(&ApiTestBase::RunPromisesAgain, base::Unretained(this))); |
219 } | 223 } |
220 | 224 |
221 } // namespace extensions | 225 } // namespace extensions |
OLD | NEW |