diff options
author | hirono@chromium.org <hirono@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-06-20 16:42:09 +0000 |
---|---|---|
committer | hirono@chromium.org <hirono@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-06-20 16:42:09 +0000 |
commit | 2f828b4a48158ae70d27034648a470dea5fb4854 (patch) | |
tree | 791d4f36c805554095674fa9afd8937da315ec98 /chrome/test | |
parent | 93a534e86d467629b87f8bc3d2a42c666809fa40 (diff) | |
download | chromium_src-2f828b4a48158ae70d27034648a470dea5fb4854.zip chromium_src-2f828b4a48158ae70d27034648a470dea5fb4854.tar.gz chromium_src-2f828b4a48158ae70d27034648a470dea5fb4854.tar.bz2 |
Make the videoOpen test use StepsRunner.
The other tests already use the StepsRunner class.
This CL make the videoOpen test use StepsRunner for consistency.
BUG=247299
TEST=browser_tests
Review URL: https://chromiumcodereview.appspot.com/16831008
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@207450 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/test')
-rw-r--r-- | chrome/test/data/extensions/api_test/file_manager_browsertest/test_cases.js | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/chrome/test/data/extensions/api_test/file_manager_browsertest/test_cases.js b/chrome/test/data/extensions/api_test/file_manager_browsertest/test_cases.js index b88ebcb..7adea9f 100644 --- a/chrome/test/data/extensions/api_test/file_manager_browsertest/test_cases.js +++ b/chrome/test/data/extensions/api_test/file_manager_browsertest/test_cases.js @@ -343,15 +343,15 @@ testcase.intermediate.audioOpen = function(path) { testcase.intermediate.videoOpen = function(path) { var appId; var videoAppId; - var steps = [ + StepsRunner.run([ function() { - setupAndWaitUntilReady(path, steps.shift()); + setupAndWaitUntilReady(path, this.next); }, function(inAppId) { appId = inAppId; // Select the song. callRemoteTestUtil( - 'selectFile', appId, ['world.ogv'], steps.shift()); + 'selectFile', appId, ['world.ogv'], this.next); }, function(result) { chrome.test.assertTrue(result); @@ -360,7 +360,7 @@ testcase.intermediate.videoOpen = function(path) { 'fakeMouseDoubleClick', appId, ['#file-list li.table-row[selected] .filename-label span'], - steps.shift()); + this.next); }, function(result) { chrome.test.assertTrue(result); @@ -368,7 +368,7 @@ testcase.intermediate.videoOpen = function(path) { callRemoteTestUtil('waitForWindow', null, ['video_player.html'], - steps.shift()); + this.next); }, function(inAppId) { videoAppId = inAppId; @@ -376,7 +376,7 @@ testcase.intermediate.videoOpen = function(path) { callRemoteTestUtil('waitForElement', videoAppId, ['video[src]'], - steps.shift()); + this.next); }, function(element) { chrome.test.assertEq( @@ -388,14 +388,12 @@ testcase.intermediate.videoOpen = function(path) { callRemoteTestUtil('waitForWindowGeometry', videoAppId, [320, 192], - steps.shift()); + this.next); }, function(element) { - chrome.test.succeed(); + checkIfNoErrorsOccured(this.next); } - ]; - steps = steps.map(function(f) { return chrome.test.callbackPass(f); }); - steps.shift()(); + ]); }; /** |