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

Unified Diff: ash/wm/overview/window_selector_unittest.cc

Issue 37733003: Make GetRootWindow() return a Window instead of a RootWindow. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 2 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 | « ash/wm/overview/window_selector_panels.cc ('k') | ash/wm/overview/window_selector_window.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/overview/window_selector_unittest.cc
diff --git a/ash/wm/overview/window_selector_unittest.cc b/ash/wm/overview/window_selector_unittest.cc
index ec7e9e2b6c86a02e6684d347e10743bf5d973717..eff4ace8056cff37cb244cfd747aaeeeacdcbac5 100644
--- a/ash/wm/overview/window_selector_unittest.cc
+++ b/ash/wm/overview/window_selector_unittest.cc
@@ -184,7 +184,7 @@ class WindowSelectorTest : public test::AshTestBase {
// Tests entering overview mode with two windows and selecting one.
TEST_F(WindowSelectorTest, Basic) {
gfx::Rect bounds(0, 0, 400, 400);
- aura::RootWindow* root_window = Shell::GetPrimaryRootWindow();
+ aura::Window* root_window = Shell::GetPrimaryRootWindow();
scoped_ptr<aura::Window> window1(CreateWindow(bounds));
scoped_ptr<aura::Window> window2(CreateWindow(bounds));
scoped_ptr<aura::Window> panel1(CreatePanelWindow(bounds));
@@ -196,7 +196,7 @@ TEST_F(WindowSelectorTest, Basic) {
EXPECT_TRUE(wm::IsActiveWindow(window2.get()));
EXPECT_EQ(window2.get(), GetFocusedWindow());
// Hide the cursor before entering overview to test that it will be shown.
- GetCursorClient(root_window)->HideCursor();
+ aura::client::GetCursorClient(root_window)->HideCursor();
// In overview mode the windows should no longer overlap and focus should
// be removed from the window.
@@ -209,9 +209,10 @@ TEST_F(WindowSelectorTest, Basic) {
EXPECT_TRUE(WindowsOverlapping(panel1.get(), panel2.get()));
// The cursor should be visible and locked as a pointer
- EXPECT_EQ(ui::kCursorPointer, root_window->last_cursor().native_type());
- EXPECT_TRUE(GetCursorClient(root_window)->IsCursorLocked());
- EXPECT_TRUE(GetCursorClient(root_window)->IsCursorVisible());
+ EXPECT_EQ(ui::kCursorPointer,
+ root_window->GetDispatcher()->last_cursor().native_type());
+ EXPECT_TRUE(aura::client::GetCursorClient(root_window)->IsCursorLocked());
+ EXPECT_TRUE(aura::client::GetCursorClient(root_window)->IsCursorVisible());
// Clicking window 1 should activate it.
ClickWindow(window1.get());
@@ -220,7 +221,7 @@ TEST_F(WindowSelectorTest, Basic) {
EXPECT_EQ(window1.get(), GetFocusedWindow());
// Cursor should have been unlocked.
- EXPECT_FALSE(GetCursorClient(root_window)->IsCursorLocked());
+ EXPECT_FALSE(aura::client::GetCursorClient(root_window)->IsCursorLocked());
}
// Tests that the shelf dimming state is removed while in overview and restored
« no previous file with comments | « ash/wm/overview/window_selector_panels.cc ('k') | ash/wm/overview/window_selector_window.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698