Commit b196eafc authored by Sammie Quon's avatar Sammie Quon Committed by Commit Bot

applist: Fix two flaky HomeScreenControllerTest tests.

Ran locally and seems fixed. I think the cause was base::RunLOops which
used to be needed for changing tablet mode, but thats no longer the case
so they just messed up some other waits.

Bug: 1027899, 1027800
Change-Id: Icf6cfd70e0e2ef826a3767a20a7bca75f31aacd8
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1947165Reviewed-by: default avatarToni Baržić <tbarzic@chromium.org>
Commit-Queue: Sammie Quon <sammiequon@chromium.org>
Cr-Commit-Position: refs/heads/master@{#721230}
parent 09b55b16
...@@ -105,9 +105,7 @@ TEST_P(HomeScreenControllerTest, ShowLauncherHistograms) { ...@@ -105,9 +105,7 @@ TEST_P(HomeScreenControllerTest, ShowLauncherHistograms) {
ui::ScopedAnimationDurationScaleMode test_duration_mode( ui::ScopedAnimationDurationScaleMode test_duration_mode(
ui::ScopedAnimationDurationScaleMode::NON_ZERO_DURATION); ui::ScopedAnimationDurationScaleMode::NON_ZERO_DURATION);
base::RunLoop().RunUntilIdle();
Shell::Get()->tablet_mode_controller()->SetEnabledForTest(true); Shell::Get()->tablet_mode_controller()->SetEnabledForTest(true);
base::RunLoop().RunUntilIdle();
auto window = CreateTestWindow(); auto window = CreateTestWindow();
base::HistogramTester tester; base::HistogramTester tester;
...@@ -130,9 +128,7 @@ TEST_P(HomeScreenControllerTest, DraggingHistograms) { ...@@ -130,9 +128,7 @@ TEST_P(HomeScreenControllerTest, DraggingHistograms) {
ui::ScopedAnimationDurationScaleMode test_duration_mode( ui::ScopedAnimationDurationScaleMode test_duration_mode(
ui::ScopedAnimationDurationScaleMode::NON_ZERO_DURATION); ui::ScopedAnimationDurationScaleMode::NON_ZERO_DURATION);
base::RunLoop().RunUntilIdle();
Shell::Get()->tablet_mode_controller()->SetEnabledForTest(true); Shell::Get()->tablet_mode_controller()->SetEnabledForTest(true);
base::RunLoop().RunUntilIdle();
base::HistogramTester tester; base::HistogramTester tester;
tester.ExpectTotalCount(kHomescreenAnimationHistogram, 0); tester.ExpectTotalCount(kHomescreenAnimationHistogram, 0);
......
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