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

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

Issue 502893002: Fix some leaks and failures under valgrind in JS extensions unit tests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 4 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
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 245d050d6325400bc5c7722c790620dc9a8d83aa..262527fdbadfbf3f2ae55cc5111f60447c4b9384 100644
--- a/extensions/test/data/unit_test_environment_specific_bindings.js
+++ b/extensions/test/data/unit_test_environment_specific_bindings.js
@@ -2,26 +2,23 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-var nativesPromise = requireAsync('testNatives');
-
function registerHooks(api) {
- var chromeTest = api.compiledApi;
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, ' '));
});
});

Powered by Google App Engine
This is Rietveld 408576698