Commit 31f131cd authored by Elly Fong-Jones's avatar Elly Fong-Jones Committed by Commit Bot

mac: fix SessionRestoreTest RestoreMinimizedWindow

This test doesn't work on Mac because the restore behavior is different.
The fact that it doesn't work was obscured by issue 899286. :(

Bug: 1028239
Change-Id: I9dab005ace535eddeec3b431818166f3e3372047
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1947929Reviewed-by: default avatarScott Violet <sky@chromium.org>
Commit-Queue: Elly Fong-Jones <ellyjones@chromium.org>
Cr-Commit-Position: refs/heads/master@{#721420}
parent 307590b9
...@@ -380,11 +380,18 @@ IN_PROC_BROWSER_TEST_F(SessionRestoreTest, RestoreMinimizedWindow) { ...@@ -380,11 +380,18 @@ IN_PROC_BROWSER_TEST_F(SessionRestoreTest, RestoreMinimizedWindow) {
Browser* restored = QuitBrowserAndRestore(browser(), 3); Browser* restored = QuitBrowserAndRestore(browser(), 3);
EXPECT_EQ(1, restored->tab_strip_model()->count()); EXPECT_EQ(1, restored->tab_strip_model()->count());
#if defined(OS_MACOSX)
// On macOS, minimized windows are neither active nor shown, to avoid causing
// space switches during session restore.
EXPECT_FALSE(restored->window()->IsActive());
EXPECT_FALSE(restored->window()->IsVisible());
#else
// Expect the window to be visible. // Expect the window to be visible.
// Prior to the fix for https://crbug.com/1018885, the window was active but // Prior to the fix for https://crbug.com/1018885, the window was active but
// not visible. // not visible.
EXPECT_TRUE(restored->window()->IsActive()); EXPECT_TRUE(restored->window()->IsActive());
EXPECT_TRUE(restored->window()->IsVisible()); EXPECT_TRUE(restored->window()->IsVisible());
#endif
} }
// Verify that restored tabs have correct disposition. Only one tab should // Verify that restored tabs have correct disposition. Only one tab should
......
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