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" |
11 #include "extensions/renderer/dispatcher.h" | 11 #include "extensions/renderer/dispatcher.h" |
12 #include "extensions/renderer/process_info_native_handler.h" | 12 #include "extensions/renderer/process_info_native_handler.h" |
13 #include "gin/converter.h" | 13 #include "gin/converter.h" |
14 #include "gin/dictionary.h" | 14 #include "gin/dictionary.h" |
15 #include "mojo/bindings/js/core.h" | 15 #include "mojo/edk/js/core.h" |
16 #include "mojo/bindings/js/handle.h" | 16 #include "mojo/edk/js/handle.h" |
17 #include "mojo/bindings/js/support.h" | 17 #include "mojo/edk/js/support.h" |
18 #include "mojo/public/cpp/bindings/interface_request.h" | 18 #include "mojo/public/cpp/bindings/interface_request.h" |
19 #include "mojo/public/cpp/system/core.h" | 19 #include "mojo/public/cpp/system/core.h" |
20 | 20 |
21 namespace extensions { | 21 namespace extensions { |
22 namespace { | 22 namespace { |
23 | 23 |
24 // Natives for the implementation of the unit test version of chrome.test. Calls | 24 // Natives for the implementation of the unit test version of chrome.test. Calls |
25 // the provided |quit_closure| when either notifyPass or notifyFail is called. | 25 // the provided |quit_closure| when either notifyPass or notifyFail is called. |
26 class TestNatives : public gin::Wrappable<TestNatives> { | 26 class TestNatives : public gin::Wrappable<TestNatives> { |
27 public: | 27 public: |
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
216 } | 216 } |
217 | 217 |
218 void ApiTestBase::RunPromisesAgain() { | 218 void ApiTestBase::RunPromisesAgain() { |
219 RunResolvedPromises(); | 219 RunResolvedPromises(); |
220 base::MessageLoop::current()->PostTask( | 220 base::MessageLoop::current()->PostTask( |
221 FROM_HERE, | 221 FROM_HERE, |
222 base::Bind(&ApiTestBase::RunPromisesAgain, base::Unretained(this))); | 222 base::Bind(&ApiTestBase::RunPromisesAgain, base::Unretained(this))); |
223 } | 223 } |
224 | 224 |
225 } // namespace extensions | 225 } // namespace extensions |
OLD | NEW |