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

Unified Diff: extensions/test/data/unit_test_environment_specific_bindings.js

Issue 603243004: Fix a leak in extensions_unittests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/test/data/unit_test_environment_specific_bindings.js
diff --git a/extensions/test/data/unit_test_environment_specific_bindings.js b/extensions/test/data/unit_test_environment_specific_bindings.js
index 3636ec71502a06fd242da31d12734a6a43759abc..2fbcc3e09be09f5543e126ded5d20781491f7010 100644
--- a/extensions/test/data/unit_test_environment_specific_bindings.js
+++ b/extensions/test/data/unit_test_environment_specific_bindings.js
@@ -2,7 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-var nativesPromise = requireAsync('testNatives');
var sendRequestNatives = requireNative('sendRequest');
function registerHooks(api) {
@@ -10,19 +9,19 @@ function registerHooks(api) {
var apiFunctions = api.apiFunctions;
apiFunctions.setHandleRequest('notifyPass', function() {
- nativesPromise.then(function(natives) {
+ requireAsync('testNatives').then(function(natives) {
natives.NotifyPass();
});
});
apiFunctions.setHandleRequest('notifyFail', function(message) {
- nativesPromise.then(function(natives) {
+ requireAsync('testNatives').then(function(natives) {
natives.NotifyFail(message);
});
});
apiFunctions.setHandleRequest('log', function() {
- nativesPromise.then(function(natives) {
+ requireAsync('testNatives').then(function(natives) {
natives.Log($Array.join(arguments, ' '));
});
});
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698