Commit 3ee80e39 authored by Jun Mukai's avatar Jun Mukai Committed by Commit Bot

Re-enble ScreenRotationTest

ScreenRotationTest test cases have been disabled due to flakiness,
but they are resolved by:
* not running on sanitizer builds (crrev.com/r/749747)
* fix of WindowAnimationWaiter (crrev.com/r/750605)

As I tested locally, they pass all of 20 runs on debug build, so
I think this isn't flaky anymore.

Bug: 1017206, 1060667, 1057868
Test: interactive_ui_tests --gtest_repeat=20
Change-Id: Ia8128e04d49833d8d06d7430bd23d78348fc0823
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2109023Reviewed-by: default avatarXiyuan Xia <xiyuan@chromium.org>
Commit-Queue: Jun Mukai <mukai@chromium.org>
Cr-Commit-Position: refs/heads/master@{#751504}
parent 4ea1eb42
...@@ -102,15 +102,7 @@ class ScreenRotationWaiter : public ash::ScreenRotationAnimatorObserver { ...@@ -102,15 +102,7 @@ class ScreenRotationWaiter : public ash::ScreenRotationAnimatorObserver {
} // namespace } // namespace
// Failing flakily on ChromeOS debug, ASAN, and MSAN. IN_PROC_BROWSER_TEST_P(ScreenRotationTest, RotateInTablet) {
// https://crbug.com/1017206
#if defined(OS_CHROMEOS) && (!defined(NDEBUG) || defined(ADDRESS_SANITIZER) || \
defined(MEMORY_SANITIZER))
#define MAYBE_RotateInTablet DISABLED_RotateInTablet
#else
#define MAYBE_RotateInTablet RotateInTablet
#endif
IN_PROC_BROWSER_TEST_P(ScreenRotationTest, MAYBE_RotateInTablet) {
// Browser window is used just to identify display. // Browser window is used just to identify display.
BrowserView* browser_view = BrowserView::GetBrowserViewForBrowser(browser()); BrowserView* browser_view = BrowserView::GetBrowserViewForBrowser(browser());
gfx::NativeWindow browser_window = gfx::NativeWindow browser_window =
...@@ -126,8 +118,7 @@ IN_PROC_BROWSER_TEST_P(ScreenRotationTest, MAYBE_RotateInTablet) { ...@@ -126,8 +118,7 @@ IN_PROC_BROWSER_TEST_P(ScreenRotationTest, MAYBE_RotateInTablet) {
waiter.Wait(); waiter.Wait();
} }
// Disabled: crbug.com/1060667 IN_PROC_BROWSER_TEST_P(ScreenRotationTest, RotateInTabletOverview) {
IN_PROC_BROWSER_TEST_P(ScreenRotationTest, DISABLE_RotateInTabletOverview) {
// Browser window is used just to identify display. // Browser window is used just to identify display.
BrowserView* browser_view = BrowserView::GetBrowserViewForBrowser(browser()); BrowserView* browser_view = BrowserView::GetBrowserViewForBrowser(browser());
gfx::NativeWindow browser_window = gfx::NativeWindow browser_window =
...@@ -143,6 +134,13 @@ IN_PROC_BROWSER_TEST_P(ScreenRotationTest, DISABLE_RotateInTabletOverview) { ...@@ -143,6 +134,13 @@ IN_PROC_BROWSER_TEST_P(ScreenRotationTest, DISABLE_RotateInTabletOverview) {
{ {
auto windows = ash::ShellTestApi().GetItemWindowListInOverviewGrids(); auto windows = ash::ShellTestApi().GetItemWindowListInOverviewGrids();
ASSERT_TRUE(windows.size() > 0); ASSERT_TRUE(windows.size() > 0);
// Skipping the wait if the animation is not ongoing because it could get
// stuck if the window animation has already finished at this point. There
// might be a chance that window animation hasn't started yet, and if so
// the test can't measure the right performance, but not failing.
// TODO(mukai): Find the way to check if the animation has finished or not,
// and replace the waiter by CreateWaiterForFinishingWindowAnimation().
if (windows[0]->layer()->GetAnimator()->is_animating())
ash::ShellTestApi().WaitForWindowFinishAnimating(windows[0]); ash::ShellTestApi().WaitForWindowFinishAnimating(windows[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