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 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
113 Dispatcher::GetJsResources(); | 113 Dispatcher::GetJsResources(); |
114 for (std::vector<std::pair<std::string, int> >::const_iterator resource = | 114 for (std::vector<std::pair<std::string, int> >::const_iterator resource = |
115 resources.begin(); | 115 resources.begin(); |
116 resource != resources.end(); | 116 resource != resources.end(); |
117 ++resource) { | 117 ++resource) { |
118 if (resource->first != "test_environment_specific_bindings") | 118 if (resource->first != "test_environment_specific_bindings") |
119 env()->RegisterModule(resource->first, resource->second); | 119 env()->RegisterModule(resource->first, resource->second); |
120 } | 120 } |
121 Dispatcher::RegisterNativeHandlers(env()->module_system(), | 121 Dispatcher::RegisterNativeHandlers(env()->module_system(), |
122 env()->context(), | 122 env()->context(), |
123 NULL, | 123 nullptr, |
124 NULL, | 124 nullptr, |
125 v8_schema_registry_.get()); | 125 v8_schema_registry_.get()); |
126 env()->module_system()->RegisterNativeHandler( | 126 env()->module_system()->RegisterNativeHandler( |
127 "process", | 127 "process", |
128 scoped_ptr<NativeHandler>(new ProcessInfoNativeHandler( | 128 scoped_ptr<NativeHandler>(new ProcessInfoNativeHandler( |
129 env()->context(), | 129 env()->context(), |
130 env()->context()->GetExtensionID(), | 130 env()->context()->GetExtensionID(), |
131 env()->context()->GetContextTypeDescription(), | 131 env()->context()->GetContextTypeDescription(), |
132 false, | 132 false, |
133 2, | 133 2, |
134 false))); | 134 false))); |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
212 } | 212 } |
213 | 213 |
214 void ApiTestBase::RunPromisesAgain() { | 214 void ApiTestBase::RunPromisesAgain() { |
215 RunResolvedPromises(); | 215 RunResolvedPromises(); |
216 base::MessageLoop::current()->PostTask( | 216 base::MessageLoop::current()->PostTask( |
217 FROM_HERE, | 217 FROM_HERE, |
218 base::Bind(&ApiTestBase::RunPromisesAgain, base::Unretained(this))); | 218 base::Bind(&ApiTestBase::RunPromisesAgain, base::Unretained(this))); |
219 } | 219 } |
220 | 220 |
221 } // namespace extensions | 221 } // namespace extensions |
OLD | NEW |