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

Side by Side Diff: ash/root_window_controller_unittest.cc

Issue 24108003: [Cleanup] Rename WindowSettings to WindowState (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase fix Created 7 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ash/root_window_controller.cc ('k') | ash/shelf/shelf_layout_manager.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/session_state_delegate.h" 7 #include "ash/session_state_delegate.h"
8 #include "ash/shelf/shelf_layout_manager.h" 8 #include "ash/shelf/shelf_layout_manager.h"
9 #include "ash/shell.h" 9 #include "ash/shell.h"
10 #include "ash/shell_window_ids.h" 10 #include "ash/shell_window_ids.h"
11 #include "ash/system/tray/system_tray_delegate.h" 11 #include "ash/system/tray/system_tray_delegate.h"
12 #include "ash/test/ash_test_base.h" 12 #include "ash/test/ash_test_base.h"
13 #include "ash/wm/system_modal_container_layout_manager.h" 13 #include "ash/wm/system_modal_container_layout_manager.h"
14 #include "ash/wm/window_properties.h" 14 #include "ash/wm/window_properties.h"
15 #include "ash/wm/window_state.h"
15 #include "ash/wm/window_util.h" 16 #include "ash/wm/window_util.h"
16 #include "base/command_line.h" 17 #include "base/command_line.h"
17 #include "ui/aura/client/focus_change_observer.h" 18 #include "ui/aura/client/focus_change_observer.h"
18 #include "ui/aura/client/focus_client.h" 19 #include "ui/aura/client/focus_client.h"
19 #include "ui/aura/env.h" 20 #include "ui/aura/env.h"
20 #include "ui/aura/root_window.h" 21 #include "ui/aura/root_window.h"
21 #include "ui/aura/test/event_generator.h" 22 #include "ui/aura/test/event_generator.h"
22 #include "ui/aura/test/test_window_delegate.h" 23 #include "ui/aura/test/test_window_delegate.h"
23 #include "ui/aura/test/test_windows.h" 24 #include "ui/aura/test/test_windows.h"
24 #include "ui/aura/window.h" 25 #include "ui/aura/window.h"
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after
252 minimized->GetWindowBoundsInScreen().ToString()); 253 minimized->GetWindowBoundsInScreen().ToString());
253 254
254 EXPECT_EQ(root_windows[0], fullscreen->GetNativeView()->GetRootWindow()); 255 EXPECT_EQ(root_windows[0], fullscreen->GetNativeView()->GetRootWindow());
255 EXPECT_TRUE(fullscreen->IsFullscreen()); 256 EXPECT_TRUE(fullscreen->IsFullscreen());
256 EXPECT_EQ("0,0 600x600", 257 EXPECT_EQ("0,0 600x600",
257 fullscreen->GetWindowBoundsInScreen().ToString()); 258 fullscreen->GetWindowBoundsInScreen().ToString());
258 EXPECT_EQ("0,0 600x600", 259 EXPECT_EQ("0,0 600x600",
259 fullscreen->GetNativeView()->GetBoundsInRootWindow().ToString()); 260 fullscreen->GetNativeView()->GetBoundsInRootWindow().ToString());
260 261
261 // Test if the restore bounds are correctly updated. 262 // Test if the restore bounds are correctly updated.
262 wm::RestoreWindow(maximized->GetNativeView()); 263 wm::GetWindowState(maximized->GetNativeView())->Restore();
263 EXPECT_EQ("100,10 100x100", maximized->GetWindowBoundsInScreen().ToString()); 264 EXPECT_EQ("100,10 100x100", maximized->GetWindowBoundsInScreen().ToString());
264 EXPECT_EQ("100,10 100x100", 265 EXPECT_EQ("100,10 100x100",
265 maximized->GetNativeView()->GetBoundsInRootWindow().ToString()); 266 maximized->GetNativeView()->GetBoundsInRootWindow().ToString());
266 267
267 fullscreen->SetFullscreen(false); 268 fullscreen->SetFullscreen(false);
268 EXPECT_EQ("300,10 100x100", 269 EXPECT_EQ("300,10 100x100",
269 fullscreen->GetWindowBoundsInScreen().ToString()); 270 fullscreen->GetWindowBoundsInScreen().ToString());
270 EXPECT_EQ("300,10 100x100", 271 EXPECT_EQ("300,10 100x100",
271 fullscreen->GetNativeView()->GetBoundsInRootWindow().ToString()); 272 fullscreen->GetNativeView()->GetBoundsInRootWindow().ToString());
272 273
(...skipping 315 matching lines...) Expand 10 before | Expand all | Expand 10 after
588 BlockUserSession(static_cast<UserSessionBlockReason>(block_reason)); 589 BlockUserSession(static_cast<UserSessionBlockReason>(block_reason));
589 event_generator.ClickLeftButton(); 590 event_generator.ClickLeftButton();
590 expected_mouse_presses++; 591 expected_mouse_presses++;
591 EXPECT_EQ(expected_mouse_presses, main_delegate->mouse_presses()); 592 EXPECT_EQ(expected_mouse_presses, main_delegate->mouse_presses());
592 UnblockUserSession(); 593 UnblockUserSession();
593 } 594 }
594 } 595 }
595 596
596 } // namespace test 597 } // namespace test
597 } // namespace ash 598 } // namespace ash
OLDNEW
« no previous file with comments | « ash/root_window_controller.cc ('k') | ash/shelf/shelf_layout_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698