Commit efbd69e0 authored by creis@chromium.org's avatar creis@chromium.org

Revert 260298 "Revert 260222 "Separate audio player tests from s..."

Undoing the revert, since MultiProfileFileManagerBrowserTest failure was
caused by Blink 170311 instead.  Sorry for the disruption.

> Revert 260222 "Separate audio player tests from special file tes..."
> 
> Still trying to track down cause of MultiProfileFileManagerBrowserTest failures:
> http://build.chromium.org/p/chromium.chromiumos/builders/Linux%20ChromiumOS%20Tests%20%282%29/builds/22674
> 
> 
> > Separate audio player tests from special file test of Files.app (2nd)
> > 
> > I have a plan to add more audio player tests. Before that, make audio player tests
> > separated for readability.
> > 
> > This is the 2nd (last) part of the work of crrev.com/214463002. First part is committed as crrev.com/260069.
> > 
> > BUG=none
> > TEST=browser_test passes
> > TBR=hirino@chromium.org
> > 
> > Review URL: https://codereview.chromium.org/212123008
> 
> TBR=yoshiki@chromium.org
> 
> Review URL: https://codereview.chromium.org/217743002

TBR=yoshiki@chromium.org

Review URL: https://codereview.chromium.org/218013002

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@260327 0039d316-1c4b-4281-b951-d872f2087c98
parent b7617c74
...@@ -57,89 +57,6 @@ function galleryOpen(path) { ...@@ -57,89 +57,6 @@ function galleryOpen(path) {
]); ]);
} }
/**
* Tests if the audio player shows up for the selected image and that the audio
* is loaded successfully.
*
* @param {string} path Directory path to be tested.
*/
function audioOpen(path) {
var appId;
var audioAppId;
var expectedFilesBefore =
TestEntryInfo.getExpectedRows(path == RootPath.DRIVE ?
BASIC_DRIVE_ENTRY_SET : BASIC_LOCAL_ENTRY_SET).sort();
var expectedFilesAfter =
expectedFilesBefore.concat([ENTRIES.newlyAdded.getExpectedRow()]).sort();
StepsRunner.run([
function() {
setupAndWaitUntilReady(null, path, this.next);
},
// 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);
waitForFileListChange(appId, expectedFilesBefore.length).then(this.next);
},
function(actualFilesAfter) {
chrome.test.assertEq(expectedFilesAfter, actualFilesAfter);
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);
},
// Wait for the changes of the player status.
function(inAppId) {
audioAppId = inAppId;
waitForElement(audioAppId, 'audio-player[playing]').then(this.next);
},
// 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(result) {
chrome.test.assertTrue(result);
var query = 'audio-player' +
'[playing]' +
'[currenttrackurl$="newly%20added%20file.ogg"]';
waitForElement(audioAppId, query).then(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
closeWindowAndWait(audioAppId).then(this.next);
},
// Wait for the audio player.
function(result) {
chrome.test.assertTrue(result);
checkIfNoErrorsOccured(this.next);
}
]);
}
/** /**
* Tests if we can open and unmount a zip file. * Tests if we can open and unmount a zip file.
* @param {string} path Directory path to be tested. * @param {string} path Directory path to be tested.
...@@ -211,18 +128,10 @@ testcase.galleryOpenDownloads = function() { ...@@ -211,18 +128,10 @@ testcase.galleryOpenDownloads = function() {
galleryOpen(RootPath.DOWNLOADS); galleryOpen(RootPath.DOWNLOADS);
}; };
testcase.audioOpenDownloads = function() {
audioOpen(RootPath.DOWNLOADS);
};
testcase.galleryOpenDrive = function() { testcase.galleryOpenDrive = function() {
galleryOpen(RootPath.DRIVE); galleryOpen(RootPath.DRIVE);
}; };
testcase.audioOpenDrive = function() {
audioOpen(RootPath.DRIVE);
};
testcase.zipOpenDownloads = function() { testcase.zipOpenDownloads = function() {
zipOpen(RootPath.DOWNLOADS); zipOpen(RootPath.DOWNLOADS);
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment