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

Side by Side Diff: chrome/browser/resources/chromeos/chromevox/testing/callback_helper.js

Issue 2909503003: WebUI: Enable ESLint rule for missing semicolons. (Closed)
Patch Set: Undo local_ntp changes from this CL. Created 3 years, 7 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 /** 5 /**
6 * Creates wrappers for callbacks and calls testDone() when all callbacks 6 * Creates wrappers for callbacks and calls testDone() when all callbacks
7 * have been invoked. 7 * have been invoked.
8 * @param {testing.Test} fixture 8 * @param {testing.Test} fixture
9 */ 9 */
10 function CallbackHelper(fixture) { 10 function CallbackHelper(fixture) {
(...skipping 22 matching lines...) Expand all
33 if (--this.pendingCallbacks_ <= 0) 33 if (--this.pendingCallbacks_ <= 0)
34 CallbackHelper.testDone_(); 34 CallbackHelper.testDone_();
35 }.bind(this)); 35 }.bind(this));
36 // runAllActionsAsync catches exceptions and puts them in the test 36 // runAllActionsAsync catches exceptions and puts them in the test
37 // framework's list of errors and fails the test if appropriate. 37 // framework's list of errors and fails the test if appropriate.
38 var runAll = runAllActionsAsync(WhenTestDone.ASSERT, completionAction); 38 var runAll = runAllActionsAsync(WhenTestDone.ASSERT, completionAction);
39 ++this.pendingCallbacks_; 39 ++this.pendingCallbacks_;
40 return function() { 40 return function() {
41 savedArgs.arguments = Array.prototype.slice.call(arguments); 41 savedArgs.arguments = Array.prototype.slice.call(arguments);
42 runAll.invoke(); 42 runAll.invoke();
43 } 43 };
44 } 44 }
45 }; 45 };
46 46
47 /** 47 /**
48 * @private 48 * @private
49 */ 49 */
50 CallbackHelper.testDone_ = this.testDone; 50 CallbackHelper.testDone_ = this.testDone;
51 // Remove testDone for public use since direclty using it conflicts with 51 // Remove testDone for public use since direclty using it conflicts with
52 // this callback helper. 52 // this callback helper.
53 delete this.testDone; 53 delete this.testDone;
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698