1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
8 * Test of Audio Palyer window and initial elements.
10 * @param {string} volumeName Test volume name passed to the addEntries
11 * @param {VolumeManagerCommon.VolumeType} volumeType Volume type.
12 * @return {Promise} Promise to be fulfilled with on success.
14 function openAudioPlayer(volumeName
, volumeType
) {
15 var test
= launch(volumeName
, volumeType
, [ENTRIES
.newlyAdded
]);
16 return test
.then(function(args
) {
17 var appWindow
= args
[0];
19 remoteCallAudioPlayer
.waitForElement(
20 appWindow
, 'audio-player /deep/ track-list'),
21 remoteCallAudioPlayer
.waitForElement(
22 appWindow
, 'audio-player /deep/ control-panel'),
23 remoteCallAudioPlayer
.waitForElement(
24 appWindow
, 'audio-player /deep/ audio'),
30 * The open audio player test for Downloads.
31 * @return {Promise} Promise to be fulfilled with on success.
33 testcase
.openAudioOnDownloads = function() {
34 return openAudioPlayer('local', 'downloads');
38 * The open audio player test for Drive
39 * @return {Promise} Promise to be fulfilled with on success.
41 testcase
.openAudioOnDrive = function() {
42 return openAudioPlayer('drive', 'drive');