Commit b047e974 authored by Luciano Pacheco's avatar Luciano Pacheco Committed by Commit Bot

Fix FileDialog tests with flag MyFilesVolume enabled

Change the test helper function openAndWaitForClosingDialog to wait for
isFileManagerLoaded instead of waiting for the default entry set as a
way to determine if the Files app has finished loading.

Enable some FileDialog tests to run with flag MyFilesVolume enabled.

Test: --gtest_filter="FileDialog/FilesAppBrowserTest.*"
Bug: 873539
Change-Id: I26177fcbe32bdd285c8067ccf85f1f8fa329502f
Reviewed-on: https://chromium-review.googlesource.com/c/1345380Reviewed-by: default avatarNoel Gordon <noel@chromium.org>
Commit-Queue: Luciano Pacheco <lucmult@chromium.org>
Cr-Commit-Position: refs/heads/master@{#609907}
parent 00b9558e
......@@ -625,17 +625,37 @@ WRAPPED_INSTANTIATE_TEST_CASE_P(
FilesAppBrowserTest,
::testing::Values(
TestCase("openFileDialogUnload").WithBrowser(),
TestCase("openFileDialogUnload").WithBrowser().EnableMyFilesVolume(),
TestCase("openFileDialogDownloads").WithBrowser(),
TestCase("openFileDialogDownloads").WithBrowser().EnableMyFilesVolume(),
TestCase("openFileDialogDownloads").WithBrowser().InGuestMode(),
TestCase("openFileDialogDownloads")
.WithBrowser()
.InGuestMode()
.EnableMyFilesVolume(),
TestCase("openFileDialogDownloads").WithBrowser().InIncognito(),
TestCase("openFileDialogDownloads")
.WithBrowser()
.InIncognito()
.EnableMyFilesVolume(),
TestCase("openFileDialogCancelDownloads").WithBrowser(),
TestCase("openFileDialogCancelDownloads")
.WithBrowser()
.EnableMyFilesVolume(),
TestCase("openFileDialogEscapeDownloads").WithBrowser(),
TestCase("openFileDialogEscapeDownloads")
.WithBrowser()
.EnableMyFilesVolume(),
TestCase("openFileDialogDrive").WithBrowser().DisableDriveFs(),
TestCase("openFileDialogDrive")
.WithBrowser()
.InIncognito()
.DisableDriveFs(),
TestCase("openFileDialogDrive").WithBrowser().EnableDriveFs(),
TestCase("openFileDialogDrive")
.WithBrowser()
.EnableDriveFs()
.EnableMyFilesVolume(),
TestCase("openFileDialogDrive")
.WithBrowser()
.InIncognito()
......
......@@ -318,15 +318,14 @@ function openAndWaitForClosingDialog(
return remoteCall.waitForWindow('dialog#').then(function(windowId) {
return remoteCall.waitForElement(windowId, '#file-list').
then(function() {
// Wait for initialization of the Files app.
return remoteCall.waitForFiles(
windowId, TestEntryInfo.getExpectedRows(BASIC_LOCAL_ENTRY_SET));
return remoteCall.waitFor('isFileManagerLoaded', windowId, true);
}).
then(function() {
return remoteCall.callRemoteTestUtil(
'selectVolume', windowId, [volumeName]);
}).
then(function() {
then(function(result) {
chrome.test.assertTrue(result, 'selectVolume failed');
var expectedRows = TestEntryInfo.getExpectedRows(expectedSet);
return remoteCall.waitForFiles(windowId, expectedRows);
}).
......
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