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

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

Issue 641283002: Separate the audio player app from Files.app Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Clean up Created 6 years, 2 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
Index: chrome/test/data/extensions/api_test/file_manager_browsertest/file_manager/open_audio_files.js
diff --git a/chrome/test/data/extensions/api_test/file_manager_browsertest/file_manager/open_audio_files.js b/chrome/test/data/extensions/api_test/file_manager_browsertest/file_manager/open_audio_files.js
index f3b817e5ac8a7f3f66ff7789fd10bcea31c3862b..d5740edf7498d6aa01008778622b8f5f05e07568 100644
--- a/chrome/test/data/extensions/api_test/file_manager_browsertest/file_manager/open_audio_files.js
+++ b/chrome/test/data/extensions/api_test/file_manager_browsertest/file_manager/open_audio_files.js
@@ -14,11 +14,11 @@
* object.
*/
function getTrackText(audioAppId, query) {
- var titleElements = callRemoteTestUtil(
+ var titleElements = audioPlayerApp.callRemoteTestUtil(
'queryAllElements',
audioAppId,
[query + ' > .data > .data-title']);
- var artistElements = callRemoteTestUtil(
+ var artistElements = audioPlayerApp.callRemoteTestUtil(
'queryAllElements',
audioAppId,
[query + ' > .data > .data-artist']);
@@ -69,17 +69,18 @@ function audioOpen(path) {
// Wait for the audio player window.
function(result) {
chrome.test.assertTrue(result);
- waitForWindow('audio_player.html').then(this.next);
+ audioPlayerApp.waitForWindow('audio_player.html').then(this.next);
},
// Wait for the changes of the player status.
function(inAppId) {
audioAppId = inAppId;
- waitForElement(audioAppId, 'audio-player[playing]').then(this.next);
+ audioPlayerApp.waitForElement(
+ audioAppId, 'audio-player[playing]').then(this.next);
},
// Get the source file name.
function(element) {
chrome.test.assertEq(
- 'filesystem:chrome-extension://hhaomjibdihmijegdhdafkllkbggdgoj/' +
+ 'filesystem:chrome-extension://' + AUDIO_PLAYER_APP_ID + '/' +
'external' + path + '/Beautiful%20Song.ogg',
element.attributes.currenttrackurl);
var query1 = 'audio-player /deep/ .track[index="0"][active]';
@@ -110,12 +111,12 @@ function audioOpen(path) {
var query = 'audio-player' +
'[playing]' +
'[currenttrackurl$="newly%20added%20file.ogg"]';
- waitForElement(audioAppId, query).then(this.next);
+ audioPlayerApp.waitForElement(audioAppId, query).then(this.next);
},
// Get the source file name.
function(element) {
chrome.test.assertEq(
- 'filesystem:chrome-extension://hhaomjibdihmijegdhdafkllkbggdgoj/' +
+ 'filesystem:chrome-extension://' + AUDIO_PLAYER_APP_ID + '/' +
'external' + path + '/newly%20added%20file.ogg',
element.attributes.currenttrackurl);
var query1 = 'audio-player /deep/ .track[index="0"]:not([active])';
@@ -138,7 +139,7 @@ function audioOpen(path) {
// Wait for the changes of the player status.
function() {
// Close window
- closeWindowAndWait(audioAppId).then(this.next);
+ audioPlayerApp.closeWindowAndWait(audioAppId).then(this.next);
},
// Wait for the audio player.
function(result) {
@@ -186,17 +187,18 @@ function audioAutoAdvance(path) {
// Wait for the audio player window.
function(result) {
chrome.test.assertTrue(result);
- waitForWindow('audio_player.html').then(this.next);
+ audioPlayerApp.waitForWindow('audio_player.html').then(this.next);
},
// Wait for the changes of the player status.
function(inAppId) {
audioAppId = inAppId;
- waitForElement(audioAppId, 'audio-player[playing]').then(this.next);
+ audioPlayerApp.waitForElement(audioAppId, 'audio-player[playing]').
+ then(this.next);
},
// Get the source file name.
function(element) {
chrome.test.assertEq(
- 'filesystem:chrome-extension://hhaomjibdihmijegdhdafkllkbggdgoj/' +
+ 'filesystem:chrome-extension://' + AUDIO_PLAYER_APP_ID + '/' +
'external' + path + '/Beautiful%20Song.ogg',
element.attributes.currenttrackurl);
@@ -204,17 +206,17 @@ function audioAutoAdvance(path) {
var query = 'audio-player' +
'[playing]' +
'[currenttrackurl$="newly%20added%20file.ogg"]';
- waitForElement(audioAppId, query).then(this.next);
+ audioPlayerApp.waitForElement(audioAppId, query).then(this.next);
},
// Get the source file name.
function(element) {
chrome.test.assertEq(
- 'filesystem:chrome-extension://hhaomjibdihmijegdhdafkllkbggdgoj/' +
+ 'filesystem:chrome-extension://' + AUDIO_PLAYER_APP_ID + '/' +
'external' + path + '/newly%20added%20file.ogg',
element.attributes.currenttrackurl);
// Close window
- closeWindowAndWait(audioAppId).then(this.next);
+ audioPlayerApp.closeWindowAndWait(audioAppId).then(this.next);
},
function(result) {
chrome.test.assertTrue(result);
@@ -246,21 +248,22 @@ function audioRepeatSingleFile(path) {
// Wait for the audio player window.
function(result) {
chrome.test.assertTrue(result);
- waitForWindow('audio_player.html').then(this.next);
+ audioPlayerApp.waitForWindow('audio_player.html').then(this.next);
},
// Wait for the changes of the player status.
function(inAppId) {
audioAppId = inAppId;
- waitForElement(audioAppId, 'audio-player[playing]').then(this.next);
+ audioPlayerApp.waitForElement(audioAppId, 'audio-player[playing]').
+ then(this.next);
},
// Get the source file name.
function(element) {
chrome.test.assertEq(
- 'filesystem:chrome-extension://hhaomjibdihmijegdhdafkllkbggdgoj/' +
+ 'filesystem:chrome-extension://' + AUDIO_PLAYER_APP_ID + '/' +
'external' + path + '/Beautiful%20Song.ogg',
element.attributes.currenttrackurl);
- callRemoteTestUtil('fakeMouseClick',
+ audioPlayerApp.callRemoteTestUtil('fakeMouseClick',
audioAppId,
['audio-player /deep/ button.repeat input'],
this.next);
@@ -269,17 +272,17 @@ function audioRepeatSingleFile(path) {
chrome.test.assertTrue(result, 'Failed to click the repeat button');
var selector = 'audio-player[playing][playcount="1"]';
- waitForElement(audioAppId, selector).then(this.next);
+ audioPlayerApp.waitForElement(audioAppId, selector).then(this.next);
},
// Get the source file name.
function(element) {
chrome.test.assertEq(
- 'filesystem:chrome-extension://hhaomjibdihmijegdhdafkllkbggdgoj/' +
+ 'filesystem:chrome-extension://' + AUDIO_PLAYER_APP_ID + '/' +
'external' + path + '/Beautiful%20Song.ogg',
element.attributes.currenttrackurl);
// Close window
- closeWindowAndWait(audioAppId).then(this.next);
+ audioPlayerApp.closeWindowAndWait(audioAppId).then(this.next);
},
// Wait for the audio player.
function(result) {
@@ -312,27 +315,28 @@ function audioNoRepeatSingleFile(path) {
// Wait for the audio player window.
function(result) {
chrome.test.assertTrue(result);
- waitForWindow('audio_player.html').then(this.next);
+ audioPlayerApp.waitForWindow('audio_player.html').then(this.next);
},
// Wait for the changes of the player status.
function(inAppId) {
audioAppId = inAppId;
- waitForElement(audioAppId, 'audio-player[playing]').then(this.next);
+ audioPlayerApp.waitForElement(audioAppId, 'audio-player[playing]').
+ then(this.next);
},
// Get the source file name.
function(element) {
chrome.test.assertEq(
- 'filesystem:chrome-extension://hhaomjibdihmijegdhdafkllkbggdgoj/' +
+ 'filesystem:chrome-extension://' + AUDIO_PLAYER_APP_ID + '/' +
'external' + path + '/Beautiful%20Song.ogg',
element.attributes.currenttrackurl);
var selector = 'audio-player[playcount="1"]:not([playing])';
- waitForElement(audioAppId, selector).then(this.next);
+ audioPlayerApp.waitForElement(audioAppId, selector).then(this.next);
},
// Get the source file name.
function(element) {
// Close window
- closeWindowAndWait(audioAppId).then(this.next);
+ audioPlayerApp.closeWindowAndWait(audioAppId).then(this.next);
},
// Wait for the audio player.
function(result) {
@@ -379,21 +383,22 @@ function audioRepeatMultipleFile(path) {
// Wait for the audio player window.
function(result) {
chrome.test.assertTrue(result);
- waitForWindow('audio_player.html').then(this.next);
+ audioPlayerApp.waitForWindow('audio_player.html').then(this.next);
},
// Wait for the changes of the player status.
function(inAppId) {
audioAppId = inAppId;
- waitForElement(audioAppId, 'audio-player[playing]').then(this.next);
+ audioPlayerApp.waitForElement(audioAppId, 'audio-player[playing]').
+ then(this.next);
},
// Get the source file name.
function(element) {
chrome.test.assertEq(
- 'filesystem:chrome-extension://hhaomjibdihmijegdhdafkllkbggdgoj/' +
+ 'filesystem:chrome-extension://' + AUDIO_PLAYER_APP_ID + '/' +
'external' + path + '/newly%20added%20file.ogg',
element.attributes.currenttrackurl);
- callRemoteTestUtil('fakeMouseClick',
+ audioPlayerApp.callRemoteTestUtil('fakeMouseClick',
audioAppId,
['audio-player /deep/ button.repeat input'],
this.next);
@@ -405,17 +410,17 @@ function audioRepeatMultipleFile(path) {
var query = 'audio-player' +
'[playing]' +
'[currenttrackurl$="Beautiful%20Song.ogg"]';
- waitForElement(audioAppId, query).then(this.next);
+ audioPlayerApp.waitForElement(audioAppId, query).then(this.next);
},
// Get the source file name.
function(element) {
chrome.test.assertEq(
- 'filesystem:chrome-extension://hhaomjibdihmijegdhdafkllkbggdgoj/' +
+ 'filesystem:chrome-extension://' + AUDIO_PLAYER_APP_ID + '/' +
'external' + path + '/Beautiful%20Song.ogg',
element.attributes.currenttrackurl);
// Close window
- closeWindowAndWait(audioAppId).then(this.next);
+ audioPlayerApp.closeWindowAndWait(audioAppId).then(this.next);
},
// Wait for the audio player.
function(result) {
@@ -462,28 +467,29 @@ function audioNoRepeatMultipleFile(path) {
// Wait for the audio player window.
function(result) {
chrome.test.assertTrue(result);
- waitForWindow('audio_player.html').then(this.next);
+ audioPlayerApp.waitForWindow('audio_player.html').then(this.next);
},
// Wait for the changes of the player status.
function(inAppId) {
audioAppId = inAppId;
- waitForElement(audioAppId, 'audio-player[playing]').then(this.next);
+ audioPlayerApp.waitForElement(audioAppId, 'audio-player[playing]').
+ then(this.next);
},
// Get the source file name.
function(element) {
chrome.test.assertEq(
- 'filesystem:chrome-extension://hhaomjibdihmijegdhdafkllkbggdgoj/' +
+ 'filesystem:chrome-extension://' + AUDIO_PLAYER_APP_ID + '/' +
'external' + path + '/newly%20added%20file.ogg',
element.attributes.currenttrackurl);
// Wait for next song.
var query = 'audio-player:not([playing])';
- waitForElement(audioAppId, query).then(this.next);
+ audioPlayerApp.waitForElement(audioAppId, query).then(this.next);
},
// Get the source file name.
function(element) {
// Close window
- closeWindowAndWait(audioAppId).then(this.next);
+ audioPlayerApp.closeWindowAndWait(audioAppId).then(this.next);
},
// Wait for the audio player.
function(result) {

Powered by Google App Engine
This is Rietveld 408576698