Commit 684ff899 authored by Noel Gordon's avatar Noel Gordon Committed by Commit Bot

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: default avatarLuciano Pacheco <lucmult@chromium.org>
Reviewed-by: default avatarTrent Apted <tapted@chromium.org>
Commit-Queue: Noel Gordon <noel@chromium.org>
Cr-Commit-Position: refs/heads/master@{#600267}
parent 501b1a0e
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