Deflake the SelectFileDialogExtensionBrowsertest setup code
Setup the "Downloads" directory in a SetUpOnMainThread step, where the
required profile() first becomes available.
"Downloads" is a required resource for FilesApp so enable the FilesApp
component extensions _after_ it has been created. Doing the reverse as
in the original code caused a data race accessing "Downloads", and the
result was systemic test flakiness (issue 477360).
Other code health and clean-up:
- remove AddMountPoint()
not needed anymore: "Downloads" setup is now handled by the
SetUpOnMainThread step.
- tune code comments
make them precise and up-to-date: 'selection-change-complete'
was mentioned, but was removed in later refactoring CLs.
- add future TODO
need to fix a FilesApp issue with CheckJavascriptErrors.
- base::ScopedTempDir tmp_dir_
make it the first member of the helper class, so it's dtor()
is called last. Life on the bots is more robust that way.
No change in behavior, no new tests: disabled tests will be re-enabled
in follow-up changes (so the chrome sheriff has an easier job).
Bug: 895703
Change-Id: Ib75ee7163ecc3aec62c474f9834ab839ae879dfd
Reviewed-on: https://chromium-review.googlesource.com/c/1285830Reviewed-by:
Luciano Pacheco <lucmult@chromium.org>
Reviewed-by:
Trent Apted <tapted@chromium.org>
Commit-Queue: Noel Gordon <noel@chromium.org>
Cr-Commit-Position: refs/heads/master@{#600267}
Showing
Please register or sign in to comment