Commit 2e95c57b authored by tapted's avatar tapted Committed by Commit bot

Deflake CustomLauncherPageBrowserTest.EventsActivateSwitchToCustomPage on ChromeOS Buildspec Tests

The failure doesn't reproduce with --enable-pixel-output-in-tests, so I
don't really know what's going on. But I suspect that since ChromeOS
only checks the *target* visibility, it's possible for the app list to
not be fully shown.

One case this could happen is on official/buildspec builders which
have more icons to load, and so the delayed-icon-load steps used
for ChromeOS via AppListMainView::ShowAppListWhenReady() end up
taking longer.

Explicitly showing the app list ensures the app list is visible
before the event generator tries to use it to generate mouse coordinates.

BUG=525128

Review URL: https://codereview.chromium.org/1308663007

Cr-Commit-Position: refs/heads/master@{#347886}
parent 85c3aac3
......@@ -154,6 +154,12 @@ IN_PROC_BROWSER_TEST_F(CustomLauncherPageBrowserTest,
LoadAndLaunchPlatformApp(kCustomLauncherPagePath, "Launched");
// Use an event generator to ensure targeting is correct.
app_list::AppListView* app_list_view = GetAppListView();
// On ChromeOS, displaying the app list can be delayed while icons finish
// loading. Explicitly show it to ensure the event generator gets meaningful
// coordinates. See http://crbug.com/525128.
app_list_view->GetWidget()->Show();
app_list::ContentsView* contents_view =
app_list_view->app_list_main_view()->contents_view();
gfx::NativeWindow window = app_list_view->GetWidget()->GetNativeWindow();
......
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