* 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']);
},
function(result) {
chrome.test.assertTrue(result);
- waitForFileListChange(appId, expectedFilesBefore.length).then(this.next);
+ remoteCall.waitForFileListChange(appId, expectedFilesBefore.length).
+ then(this.next);
},
function(actualFilesAfter) {
chrome.test.assertEq(expectedFilesAfter, actualFilesAfter);
- callRemoteTestUtil(
+ remoteCall.callRemoteTestUtil(
'openFile', appId, ['Beautiful Song.ogg'], this.next);
},
// 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]';
},
// Open another file.
function() {
- callRemoteTestUtil(
+ remoteCall.callRemoteTestUtil(
'openFile', appId, ['newly added file.ogg'], this.next);
},
// Wait for the changes of the player status.
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])';
// 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) {
},
function(result) {
chrome.test.assertTrue(result);
- waitForFileListChange(appId, expectedFilesBefore.length).then(this.next);
+ remoteCall.waitForFileListChange(appId, expectedFilesBefore.length).
+ then(this.next);
},
function(actualFilesAfter) {
chrome.test.assertEq(expectedFilesAfter, actualFilesAfter);
- callRemoteTestUtil(
+ remoteCall.callRemoteTestUtil(
'openFile', appId, ['Beautiful Song.ogg'], this.next);
},
// 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 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);
function(inAppId) {
appId = inAppId;
- callRemoteTestUtil(
+ remoteCall.callRemoteTestUtil(
'openFile', appId, ['Beautiful Song.ogg'], this.next);
},
// 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',
- audioAppId,
- ['audio-player /deep/ button.repeat input'],
- this.next);
+ audioPlayerApp.callRemoteTestUtil(
+ 'fakeMouseClick',
+ audioAppId,
+ ['audio-player /deep/ button.repeat input'],
+ this.next);
},
function(result) {
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) {
function(inAppId) {
appId = inAppId;
- callRemoteTestUtil(
+ remoteCall.callRemoteTestUtil(
'openFile', appId, ['Beautiful Song.ogg'], this.next);
},
// 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) {
},
function(result) {
chrome.test.assertTrue(result);
- waitForFiles(appId, expectedFilesAfter).then(this.next);
+ remoteCall.waitForFiles(appId, expectedFilesAfter).then(this.next);
},
function(/* no result */) {
- callRemoteTestUtil(
+ remoteCall.callRemoteTestUtil(
'openFile', appId, ['newly added file.ogg'], this.next);
},
// 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',
- audioAppId,
- ['audio-player /deep/ button.repeat input'],
- this.next);
+ audioPlayerApp.callRemoteTestUtil(
+ 'fakeMouseClick',
+ audioAppId,
+ ['audio-player /deep/ button.repeat input'],
+ this.next);
},
function(result) {
chrome.test.assertTrue(result, 'Failed to click the repeat button');
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) {
},
function(result) {
chrome.test.assertTrue(result);
- waitForFiles(appId, expectedFilesAfter).then(this.next);
+ remoteCall.waitForFiles(appId, expectedFilesAfter).then(this.next);
},
function(/* no result */) {
- callRemoteTestUtil(
+ remoteCall.callRemoteTestUtil(
'openFile', appId, ['newly added file.ogg'], this.next);
},
// 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) {