Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(335)

Side by Side Diff: extensions/renderer/bindings/api_binding_unittest.cc

Issue 2947463002: [Extensions Bindings] Add a bindings/ subdirectory under renderer (Closed)
Patch Set: . Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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.h"
6 #include "base/bind.h" 5 #include "base/bind.h"
7 #include "base/memory/ptr_util.h" 6 #include "base/memory/ptr_util.h"
8 #include "base/stl_util.h" 7 #include "base/stl_util.h"
9 #include "base/strings/stringprintf.h" 8 #include "base/strings/stringprintf.h"
10 #include "base/values.h" 9 #include "base/values.h"
11 #include "extensions/renderer/api_binding_hooks.h" 10 #include "extensions/renderer/bindings/api_binding.h"
12 #include "extensions/renderer/api_binding_hooks_test_delegate.h" 11 #include "extensions/renderer/bindings/api_binding_hooks.h"
13 #include "extensions/renderer/api_binding_test.h" 12 #include "extensions/renderer/bindings/api_binding_hooks_test_delegate.h"
14 #include "extensions/renderer/api_binding_test_util.h" 13 #include "extensions/renderer/bindings/api_binding_test.h"
15 #include "extensions/renderer/api_event_handler.h" 14 #include "extensions/renderer/bindings/api_binding_test_util.h"
16 #include "extensions/renderer/api_invocation_errors.h" 15 #include "extensions/renderer/bindings/api_event_handler.h"
17 #include "extensions/renderer/api_request_handler.h" 16 #include "extensions/renderer/bindings/api_invocation_errors.h"
18 #include "extensions/renderer/api_type_reference_map.h" 17 #include "extensions/renderer/bindings/api_request_handler.h"
18 #include "extensions/renderer/bindings/api_type_reference_map.h"
19 #include "gin/arguments.h" 19 #include "gin/arguments.h"
20 #include "gin/converter.h" 20 #include "gin/converter.h"
21 #include "gin/public/context_holder.h" 21 #include "gin/public/context_holder.h"
22 #include "testing/gtest/include/gtest/gtest.h" 22 #include "testing/gtest/include/gtest/gtest.h"
23 #include "third_party/WebKit/public/web/WebScopedUserGesture.h" 23 #include "third_party/WebKit/public/web/WebScopedUserGesture.h"
24 #include "v8/include/v8.h" 24 #include "v8/include/v8.h"
25 25
26 namespace extensions { 26 namespace extensions {
27 27
28 using namespace api_errors; 28 using namespace api_errors;
(...skipping 1239 matching lines...) Expand 10 before | Expand all | Expand 10 after
1268 1268
1269 // The extra property should be present on the binding object. 1269 // The extra property should be present on the binding object.
1270 EXPECT_EQ("42", GetStringPropertyFromObject(binding_object, context, 1270 EXPECT_EQ("42", GetStringPropertyFromObject(binding_object, context,
1271 "hookedProperty")); 1271 "hookedProperty"));
1272 // Sanity check: other values should still be there. 1272 // Sanity check: other values should still be there.
1273 EXPECT_EQ("function", 1273 EXPECT_EQ("function",
1274 GetStringPropertyFromObject(binding_object, context, "oneString")); 1274 GetStringPropertyFromObject(binding_object, context, "oneString"));
1275 } 1275 }
1276 1276
1277 } // namespace extensions 1277 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698