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

Side by Side 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 unified diff | Download patch
« no previous file with comments | « extensions/renderer/native_extension_bindings_system_unittest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 // test_custom_bindings.js 5 // test_custom_bindings.js
6 // mini-framework for ExtensionApiTest browser tests 6 // mini-framework for ExtensionApiTest browser tests
7 7
8 var binding = require('binding').Binding.create('test'); 8 var binding = apiBridge || require('binding').Binding.create('test');
9 9
10 var environmentSpecificBindings = require('test_environment_specific_bindings'); 10 var environmentSpecificBindings = require('test_environment_specific_bindings');
11 var GetExtensionAPIDefinitionsForTest = 11 var GetExtensionAPIDefinitionsForTest =
12 requireNative('apiDefinitions').GetExtensionAPIDefinitionsForTest; 12 requireNative('apiDefinitions').GetExtensionAPIDefinitionsForTest;
13 var GetAPIFeatures = requireNative('test_features').GetAPIFeatures; 13 var GetAPIFeatures = requireNative('test_features').GetAPIFeatures;
14 var natives = requireNative('test_native_handler'); 14 var natives = requireNative('test_native_handler');
15 var uncaughtExceptionHandler = require('uncaught_exception_handler'); 15 var uncaughtExceptionHandler = require('uncaught_exception_handler');
16 var userGestures = requireNative('user_gestures'); 16 var userGestures = requireNative('user_gestures');
17 17
18 var GetModuleSystem = requireNative('v8_context').GetModuleSystem; 18 var GetModuleSystem = requireNative('v8_context').GetModuleSystem;
(...skipping 331 matching lines...) Expand 10 before | Expand all | Expand 10 after
350 uncaughtExceptionHandler.setHandler(callback); 350 uncaughtExceptionHandler.setHandler(callback);
351 }); 351 });
352 352
353 apiFunctions.setHandleRequest('getWakeEventPage', function() { 353 apiFunctions.setHandleRequest('getWakeEventPage', function() {
354 return natives.GetWakeEventPage(); 354 return natives.GetWakeEventPage();
355 }); 355 });
356 356
357 environmentSpecificBindings.registerHooks(api); 357 environmentSpecificBindings.registerHooks(api);
358 }); 358 });
359 359
360 exports.$set('binding', binding.generate()); 360 if (!apiBridge)
361 exports.$set('binding', binding.generate());
OLDNEW
« 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