Commit 067836a2 authored by Jun Mukai's avatar Jun Mukai Committed by Commit Bot

Re-enable TabletmodeTransitionTest

This has been disabled due to flakiness. The flakiness was
observed on asan bot and win7 bot. Now this test is only
built on non-sanitizer builds for chromeos (see r749747),
so it's safe to re-enable it.

As I tried running, it still fails sometimes on debug builds
on waiting logic, so I modified it slightly.

Bug: 1057864, 1057868
Test: interactive_ui_tests --gtest_repeat=20
Change-Id: I9e8112ffbd6f30f042ffd03f6b29bc7e1dbe18b3
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2103521Reviewed-by: default avatarXiyuan Xia <xiyuan@chromium.org>
Commit-Queue: Jun Mukai <mukai@chromium.org>
Cr-Commit-Position: refs/heads/master@{#750605}
parent b3d68348
...@@ -94,7 +94,6 @@ class WindowAnimationWaiter : public ui::LayerAnimationObserver { ...@@ -94,7 +94,6 @@ class WindowAnimationWaiter : public ui::LayerAnimationObserver {
ui::LayerAnimationSequence* sequence) override {} ui::LayerAnimationSequence* sequence) override {}
void Wait() { void Wait() {
DCHECK(animator_->is_animating());
run_loop_.Run(); run_loop_.Run();
} }
......
...@@ -61,19 +61,22 @@ class TabletModeTransitionTest : public UIPerformanceTest { ...@@ -61,19 +61,22 @@ class TabletModeTransitionTest : public UIPerformanceTest {
DISALLOW_COPY_AND_ASSIGN(TabletModeTransitionTest); DISALLOW_COPY_AND_ASSIGN(TabletModeTransitionTest);
}; };
// TODO(http://crbug.com/1057864): Disabled due to flakiness. IN_PROC_BROWSER_TEST_F(TabletModeTransitionTest, EnterExit) {
IN_PROC_BROWSER_TEST_F(TabletModeTransitionTest, DISABLED_EnterExit) {
// Activate the first window. The top window is the only window which animates // Activate the first window. The top window is the only window which animates
// and is the one we should check to see if the tablet animation has finished. // and is the one we should check to see if the tablet animation has finished.
Browser* browser = BrowserList::GetInstance()->GetLastActive(); Browser* browser = BrowserList::GetInstance()->GetLastActive();
aura::Window* browser_window = browser->window()->GetNativeWindow(); aura::Window* browser_window = browser->window()->GetNativeWindow();
ash::ShellTestApi shell_test_api;
ash::ShellTestApi().SetTabletModeEnabledForTest( auto waiter =
true, /*wait_for_completion=*/false); shell_test_api.CreateWaiterForFinishingWindowAnimation(browser_window);
ash::ShellTestApi().WaitForWindowFinishAnimating(browser_window); shell_test_api.SetTabletModeEnabledForTest(true,
/*wait_for_completion=*/false);
std::move(waiter).Run();
ash::ShellTestApi().SetTabletModeEnabledForTest( waiter =
false, /*wait_for_completion=*/false); shell_test_api.CreateWaiterForFinishingWindowAnimation(browser_window);
EXPECT_TRUE(browser_window->layer()->GetAnimator()->is_animating()); shell_test_api.SetTabletModeEnabledForTest(false,
ash::ShellTestApi().WaitForWindowFinishAnimating(browser_window); /*wait_for_completion=*/false);
std::move(waiter).Run();
} }
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