chromeos: fixes BrowserFinderChromeOSTest.FindBrowserOwnedByAnotherProfile

for mash. This test was creating an aura window, which is problematic for
the mash case and MultiUserWindowManager. In particular, MultiUserWindowManager
calls over mojo, and the ash side ignores calls to non-top-level windows.
Because the test creates an aura::Window directly the window isn't a top-level
and ash was ignoring the MultiUserWindowManager calls. The fix is to create
a views::Widget, which is a top-level, so that ash doesn't ignore the request.

This also adds a call to FlushBindings() to ensure some async processing
completes before the assertions.

I would like to replace usage of TestBrowserWindowAura, with
TestBrowserWindowViews, but that can be done separately.

BUG=910241
TEST=test only change

Change-Id: I2e6ccd86c4c39ae441c99efad82de43308ff4ae8
Reviewed-on: https://chromium-review.googlesource.com/c/1384657
Reviewed-by: Xiyuan Xia <xiyuan@chromium.org>
Commit-Queue: Scott Violet <sky@chromium.org>
Cr-Commit-Position: refs/heads/master@{#617950}
3 files changed