Chromium Code Reviews| 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(); |