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

Side by Side Diff: ash/root_window_controller_unittest.cc

Issue 14584004: Remove ash-disable-launcher-per-display flag (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 7 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 unified diff | Download patch
« no previous file with comments | « ash/root_window_controller.cc ('k') | ash/screen_ash_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ash/root_window_controller.h" 5 #include "ash/root_window_controller.h"
6 6
7 #include "ash/display/display_controller.h" 7 #include "ash/display/display_controller.h"
8 #include "ash/session_state_delegate.h" 8 #include "ash/session_state_delegate.h"
9 #include "ash/shelf/shelf_layout_manager.h" 9 #include "ash/shelf/shelf_layout_manager.h"
10 #include "ash/shell.h" 10 #include "ash/shell.h"
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 137
138 views::Widget* normal = CreateTestWidget(gfx::Rect(650, 10, 100, 100)); 138 views::Widget* normal = CreateTestWidget(gfx::Rect(650, 10, 100, 100));
139 EXPECT_EQ(root_windows[1], normal->GetNativeView()->GetRootWindow()); 139 EXPECT_EQ(root_windows[1], normal->GetNativeView()->GetRootWindow());
140 EXPECT_EQ("650,10 100x100", normal->GetWindowBoundsInScreen().ToString()); 140 EXPECT_EQ("650,10 100x100", normal->GetWindowBoundsInScreen().ToString());
141 EXPECT_EQ("50,10 100x100", 141 EXPECT_EQ("50,10 100x100",
142 normal->GetNativeView()->GetBoundsInRootWindow().ToString()); 142 normal->GetNativeView()->GetBoundsInRootWindow().ToString());
143 143
144 views::Widget* maximized = CreateTestWidget(gfx::Rect(700, 10, 100, 100)); 144 views::Widget* maximized = CreateTestWidget(gfx::Rect(700, 10, 100, 100));
145 maximized->Maximize(); 145 maximized->Maximize();
146 EXPECT_EQ(root_windows[1], maximized->GetNativeView()->GetRootWindow()); 146 EXPECT_EQ(root_windows[1], maximized->GetNativeView()->GetRootWindow());
147 if (Shell::IsLauncherPerDisplayEnabled()) { 147 EXPECT_EQ("600,0 500x452", maximized->GetWindowBoundsInScreen().ToString());
148 EXPECT_EQ("600,0 500x452", maximized->GetWindowBoundsInScreen().ToString()); 148 EXPECT_EQ("0,0 500x452",
149 EXPECT_EQ("0,0 500x452", 149 maximized->GetNativeView()->GetBoundsInRootWindow().ToString());
150 maximized->GetNativeView()->GetBoundsInRootWindow().ToString());
151 } else {
152 EXPECT_EQ("600,0 500x500", maximized->GetWindowBoundsInScreen().ToString());
153 EXPECT_EQ("0,0 500x500",
154 maximized->GetNativeView()->GetBoundsInRootWindow().ToString());
155 }
156 150
157 views::Widget* minimized = CreateTestWidget(gfx::Rect(800, 10, 100, 100)); 151 views::Widget* minimized = CreateTestWidget(gfx::Rect(800, 10, 100, 100));
158 minimized->Minimize(); 152 minimized->Minimize();
159 EXPECT_EQ(root_windows[1], minimized->GetNativeView()->GetRootWindow()); 153 EXPECT_EQ(root_windows[1], minimized->GetNativeView()->GetRootWindow());
160 EXPECT_EQ("800,10 100x100", 154 EXPECT_EQ("800,10 100x100",
161 minimized->GetWindowBoundsInScreen().ToString()); 155 minimized->GetWindowBoundsInScreen().ToString());
162 156
163 views::Widget* fullscreen = CreateTestWidget(gfx::Rect(900, 10, 100, 100)); 157 views::Widget* fullscreen = CreateTestWidget(gfx::Rect(900, 10, 100, 100));
164 fullscreen->SetFullscreen(true); 158 fullscreen->SetFullscreen(true);
165 EXPECT_EQ(root_windows[1], fullscreen->GetNativeView()->GetRootWindow()); 159 EXPECT_EQ(root_windows[1], fullscreen->GetNativeView()->GetRootWindow());
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after
397 w1->Activate(); 391 w1->Activate();
398 EXPECT_FALSE(controller->GetFullscreenWindow()); 392 EXPECT_FALSE(controller->GetFullscreenWindow());
399 393
400 // If the fullscreen window is active, GetFullscreenWindow() should find it. 394 // If the fullscreen window is active, GetFullscreenWindow() should find it.
401 w2->Activate(); 395 w2->Activate();
402 EXPECT_EQ(w2->GetNativeWindow(), controller->GetFullscreenWindow()); 396 EXPECT_EQ(w2->GetNativeWindow(), controller->GetFullscreenWindow());
403 } 397 }
404 398
405 } // namespace test 399 } // namespace test
406 } // namespace ash 400 } // namespace ash
OLDNEW
« no previous file with comments | « ash/root_window_controller.cc ('k') | ash/screen_ash_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698