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

Unified Diff: chrome/test/data/extensions/api_test/file_manager_browsertest/background.js

Issue 15682007: Files.app: Removed a side effect of StepsRunner.next. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed a JsDoc. Created 7 years, 6 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: chrome/test/data/extensions/api_test/file_manager_browsertest/background.js
diff --git a/chrome/test/data/extensions/api_test/file_manager_browsertest/background.js b/chrome/test/data/extensions/api_test/file_manager_browsertest/background.js
index 375f6cf4c24a8a2361e711f02c1eac821eb24e4a..27cf7b299f813573fa968b6f3bf6a4b4d47e491e 100644
--- a/chrome/test/data/extensions/api_test/file_manager_browsertest/background.js
+++ b/chrome/test/data/extensions/api_test/file_manager_browsertest/background.js
@@ -35,7 +35,7 @@ function callRemoteTestUtil(func, appId, args, callback) {
function StepsRunner() {
/**
* List of steps.
- * @type {Array.function>}
+ * @type {Array.<function>}
mtomasz 2013/06/04 03:41:59 Oops! Thanks!
* @private
*/
this.steps_ = [];
@@ -54,7 +54,7 @@ StepsRunner.prototype = {
* @return {function} The next closure.
*/
get next() {
- return this.steps_.shift();
+ return this.steps_[0];
}
};
@@ -70,7 +70,10 @@ StepsRunner.prototype.run_ = function(steps) {
this.steps_.push(function() {});
this.steps_ = this.steps_.map(function(f) {
- return chrome.test.callbackPass(f.bind(this));
+ return chrome.test.callbackPass(function() {
+ this.steps_.shift();
+ f.apply(this, arguments);
+ }.bind(this));
}.bind(this));
this.next();
« 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