| OLD | NEW |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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_binding_js_util.h" | 5 #include "extensions/renderer/bindings/api_binding_js_util.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "extensions/renderer/api_binding_test_util.h" | 8 #include "extensions/renderer/bindings/api_binding_test_util.h" |
| 9 #include "extensions/renderer/api_bindings_system.h" | 9 #include "extensions/renderer/bindings/api_bindings_system.h" |
| 10 #include "extensions/renderer/api_bindings_system_unittest.h" | 10 #include "extensions/renderer/bindings/api_bindings_system_unittest.h" |
| 11 #include "gin/handle.h" | 11 #include "gin/handle.h" |
| 12 | 12 |
| 13 namespace extensions { | 13 namespace extensions { |
| 14 | 14 |
| 15 class APIBindingJSUtilUnittest : public APIBindingsSystemTest { | 15 class APIBindingJSUtilUnittest : public APIBindingsSystemTest { |
| 16 protected: | 16 protected: |
| 17 APIBindingJSUtilUnittest() {} | 17 APIBindingJSUtilUnittest() {} |
| 18 ~APIBindingJSUtilUnittest() override {} | 18 ~APIBindingJSUtilUnittest() override {} |
| 19 | 19 |
| 20 gin::Handle<APIBindingJSUtil> CreateUtil() { | 20 gin::Handle<APIBindingJSUtil> CreateUtil() { |
| (...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 184 EXPECT_EQ("alpha.functionWithCallback", last_request()->method_name); | 184 EXPECT_EQ("alpha.functionWithCallback", last_request()->method_name); |
| 185 EXPECT_EQ("[\"stringy\"]", ValueToString(*last_request()->arguments)); | 185 EXPECT_EQ("[\"stringy\"]", ValueToString(*last_request()->arguments)); |
| 186 EXPECT_EQ(binding::RequestThread::UI, last_request()->thread); | 186 EXPECT_EQ(binding::RequestThread::UI, last_request()->thread); |
| 187 bindings_system()->CompleteRequest(last_request()->request_id, | 187 bindings_system()->CompleteRequest(last_request()->request_id, |
| 188 base::ListValue(), std::string()); | 188 base::ListValue(), std::string()); |
| 189 EXPECT_EQ("true", GetStringPropertyFromObject(context->Global(), context, | 189 EXPECT_EQ("true", GetStringPropertyFromObject(context->Global(), context, |
| 190 "callbackCalled")); | 190 "callbackCalled")); |
| 191 } | 191 } |
| 192 | 192 |
| 193 } // namespace extensions | 193 } // namespace extensions |
| OLD | NEW |