Commit 94f0ac2e authored by Luciano Pacheco's avatar Luciano Pacheco Committed by Commit Bot

Fix some more tests with MyFilesVolume flag enabled

Change directory tree icon override to also override for
volume-type-icon which makes tests that uses selectVolume helper to be
able to continue to select Downloads folder. This will be properly fixed
and removed when MyFilesVolume is fully rolled out.

Bug: 873539
Change-Id: I38a36aaacf4a52b68237466846cbd468ee60b0b9
Reviewed-on: https://chromium-review.googlesource.com/c/1343594Reviewed-by: default avatarJoel Hockey <joelhockey@chromium.org>
Reviewed-by: default avatarLuciano Pacheco <lucmult@chromium.org>
Commit-Queue: Luciano Pacheco <lucmult@chromium.org>
Cr-Commit-Position: refs/heads/master@{#609854}
parent 828e3c9a
...@@ -711,8 +711,10 @@ WRAPPED_INSTANTIATE_TEST_CASE_P( ...@@ -711,8 +711,10 @@ WRAPPED_INSTANTIATE_TEST_CASE_P(
MyFiles, /* my_files.js */ MyFiles, /* my_files.js */
FilesAppBrowserTest, FilesAppBrowserTest,
::testing::Values( ::testing::Values(
// search should only be disabled if MyFiles isn't a volume.
TestCase("hideSearchButton"), TestCase("hideSearchButton"),
TestCase("directoryTreeRefresh"), TestCase("directoryTreeRefresh"),
TestCase("directoryTreeRefresh").EnableMyFilesVolume(),
TestCase("showMyFiles"), TestCase("showMyFiles"),
TestCase("showMyFiles").EnableMyFilesVolume(), TestCase("showMyFiles").EnableMyFilesVolume(),
TestCase("myFilesDisplaysAndOpensEntries"), TestCase("myFilesDisplaysAndOpensEntries"),
......
...@@ -659,9 +659,12 @@ function SubDirectoryItem(label, dirEntry, parentDirItem, tree) { ...@@ -659,9 +659,12 @@ function SubDirectoryItem(label, dirEntry, parentDirItem, tree) {
} }
} else { } else {
const rootType = location.rootType || null; const rootType = location.rootType || null;
const iconName = const iconOverride = directorytree.getIconOverrides(rootType, dirEntry);
directorytree.getIconOverrides(rootType, dirEntry) || 'folder'; // Add Downloads icon as volume so current test code passes with
icon.setAttribute('file-type-icon', iconName); // MyFilesVolume flag enabled and disabled.
if (iconOverride)
icon.setAttribute('volume-type-icon', iconOverride);
icon.setAttribute('file-type-icon', iconOverride || 'folder');
item.updateSharedStatusIcon(); item.updateSharedStatusIcon();
} }
......
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