Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(17)

Unified Diff: athena/wm/window_manager_unittest.cc

Issue 513313003: Fix crash when using title drag on a window opened while split view is active (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « athena/wm/window_manager_impl.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: athena/wm/window_manager_unittest.cc
diff --git a/athena/wm/window_manager_unittest.cc b/athena/wm/window_manager_unittest.cc
index 456e35c396685ef6c67a7667d4369577ff12bea4..0f03ae12ce2229b7ae13b6349965fb06353452b6 100644
--- a/athena/wm/window_manager_unittest.cc
+++ b/athena/wm/window_manager_unittest.cc
@@ -139,6 +139,8 @@ TEST_F(WindowManagerTest, BezelGestureToSwitchBetweenWindows) {
scoped_ptr<aura::Window> first(CreateWindow(&delegate));
scoped_ptr<aura::Window> second(CreateWindow(&delegate));
scoped_ptr<aura::Window> third(CreateWindow(&delegate));
+ first->Hide();
+ second->Hide();
test::WindowManagerImplTestApi wm_api;
aura::client::ParentWindowWithContext(
@@ -163,6 +165,9 @@ TEST_F(WindowManagerTest, BezelGestureToSwitchBetweenWindows) {
EXPECT_TRUE(wm::IsActiveWindow(second.get()));
EXPECT_EQ(second.get(),
wm_api.GetWindowListProvider()->GetWindowList().back());
+ EXPECT_FALSE(first->IsVisible());
+ EXPECT_TRUE(second->IsVisible());
+ EXPECT_FALSE(third->IsVisible());
}
TEST_F(WindowManagerTest, TitleDragSwitchBetweenWindows) {
@@ -300,16 +305,12 @@ TEST_F(WindowManagerTest, NewWindowBounds) {
EXPECT_NE(work_area.ToString(),
left_bounds.size().ToString());
+ // A new window should replace the left window when in split view.
scoped_ptr<aura::Window> third(CreateWindow(&delegate));
aura::client::ParentWindowWithContext(
third.get(), ScreenManager::Get()->GetContext(), gfx::Rect());
- EXPECT_NE(wm_api.GetSplitViewController()->left_window(), third.get());
+ EXPECT_EQ(wm_api.GetSplitViewController()->left_window(), third.get());
EXPECT_EQ(left_bounds.ToString(), third->bounds().ToString());
-
- third->Hide();
- EXPECT_EQ(
- left_bounds.ToString(),
- wm_api.GetSplitViewController()->left_window()->bounds().ToString());
}
TEST_F(WindowManagerTest, SplitModeActivationByShortcut) {
« no previous file with comments | « athena/wm/window_manager_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698