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

Unified Diff: extensions/renderer/resources/test_custom_bindings.js

Issue 2575173002: [Extensions Bindings] Add a bridge to use current custom bindings (Closed)
Patch Set: . Created 4 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « extensions/renderer/native_extension_bindings_system_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/renderer/resources/test_custom_bindings.js
diff --git a/extensions/renderer/resources/test_custom_bindings.js b/extensions/renderer/resources/test_custom_bindings.js
index 2737efeb1fc05db0cc188208344b88e11df2ffcd..007533150bcc83101d9dd0ab0fa0097b5f8a1c97 100644
--- a/extensions/renderer/resources/test_custom_bindings.js
+++ b/extensions/renderer/resources/test_custom_bindings.js
@@ -5,7 +5,7 @@
// test_custom_bindings.js
// mini-framework for ExtensionApiTest browser tests
-var binding = require('binding').Binding.create('test');
+var binding = apiBridge || require('binding').Binding.create('test');
var environmentSpecificBindings = require('test_environment_specific_bindings');
var GetExtensionAPIDefinitionsForTest =
@@ -357,4 +357,5 @@ binding.registerCustomHook(function(api) {
environmentSpecificBindings.registerHooks(api);
});
-exports.$set('binding', binding.generate());
+if (!apiBridge)
+ exports.$set('binding', binding.generate());
« no previous file with comments | « extensions/renderer/native_extension_bindings_system_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698