Chromium Code Reviews| Index: chrome/test/data/extensions/api_test/file_manager_browsertest/open_special_types.js |
| diff --git a/chrome/test/data/extensions/api_test/file_manager_browsertest/open_special_types.js b/chrome/test/data/extensions/api_test/file_manager_browsertest/open_special_types.js |
| index 7a759e977e7e0e10ab4c477488eb846fc947232e..a5131c2949098d657a1ce79f3fd005378e77a9dc 100644 |
| --- a/chrome/test/data/extensions/api_test/file_manager_browsertest/open_special_types.js |
| +++ b/chrome/test/data/extensions/api_test/file_manager_browsertest/open_special_types.js |
| @@ -77,10 +77,16 @@ function audioOpen(path) { |
| // Select the song. |
| function(inAppId) { |
| appId = inAppId; |
| + |
| + // Add an additional audio file. |
| + addEntries(['local', 'drive'], [ENTRIES.newlyAdded], this.next); |
| + }, |
| + function(result) { |
| + chrome.test.assertTrue(result); |
| callRemoteTestUtil( |
| 'openFile', appId, ['Beautiful Song.ogg'], this.next); |
| }, |
| - // Wait for the audio player. |
| + // Wait for the audio player window. |
| function(result) { |
| chrome.test.assertTrue(result); |
| callRemoteTestUtil('waitForWindow', |
| @@ -88,7 +94,7 @@ function audioOpen(path) { |
| ['audio_player.html'], |
| this.next); |
| }, |
| - // Wait for the audio tag and verify the source. |
| + // Wait for the changes of the player status. |
| function(inAppId) { |
| audioAppId = inAppId; |
| callRemoteTestUtil('waitForElement', |
| @@ -96,12 +102,44 @@ function audioOpen(path) { |
| ['audio-player[playing]'], |
| this.next); |
| }, |
| - // Get the title tag. |
| + // Get the source file name. |
| function(element) { |
| chrome.test.assertEq( |
| 'filesystem:chrome-extension://hhaomjibdihmijegdhdafkllkbggdgoj/' + |
| 'external' + path + '/Beautiful%20Song.ogg', |
| element.attributes.currenttrackurl); |
| + |
| + // Open another file. |
| + callRemoteTestUtil( |
| + 'openFile', appId, ['newly added file.ogg'], this.next); |
| + }, |
| + // Wait for the changes of the player status. |
| + function(inAppId) { |
| + callRemoteTestUtil( |
| + 'waitForElement', |
| + audioAppId, |
| + ['audio-player' + |
| + '[playing]' + |
| + '[currenttrackurl$="newly%20added%20file.ogg"]'], |
| + this.next); |
| + }, |
| + // Get the source file name. |
| + function(element) { |
| + chrome.test.assertEq( |
| + 'filesystem:chrome-extension://hhaomjibdihmijegdhdafkllkbggdgoj/' + |
| + 'external' + path + '/newly%20added%20file.ogg', |
| + element.attributes.currenttrackurl); |
| + |
| + // Close window |
| + callRemoteTestUtil('closeWindow', |
| + null, |
| + [audioAppId], |
| + this.next); |
| + }, |
| + // Wait for the audio player. |
| + function(result) { |
| + console.log(result); |
|
hirono
2014/03/04 09:14:13
nit: Please remove the log.
yoshiki
2014/03/05 02:24:44
Done.
|
| + chrome.test.assertTrue(result); |
| checkIfNoErrorsOccured(this.next); |
| } |
| ]); |