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

Side by Side Diff: ash/wm/panels/panel_window_resizer_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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ash/wm/panels/panel_window_resizer.cc ('k') | ash/wm/partial_screenshot_view.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) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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/wm/panels/panel_window_resizer.h" 5 #include "ash/wm/panels/panel_window_resizer.h"
6 6
7 #include "ash/launcher/launcher.h" 7 #include "ash/launcher/launcher.h"
8 #include "ash/launcher/launcher_model.h" 8 #include "ash/launcher/launcher_model.h"
9 #include "ash/root_window_controller.h" 9 #include "ash/root_window_controller.h"
10 #include "ash/shelf/shelf_layout_manager.h" 10 #include "ash/shelf/shelf_layout_manager.h"
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 void DragRevert() { 95 void DragRevert() {
96 resizer_->RevertDrag(); 96 resizer_->RevertDrag();
97 resizer_.reset(); 97 resizer_.reset();
98 } 98 }
99 99
100 // Test dragging the panel slightly, then detaching, and then reattaching 100 // Test dragging the panel slightly, then detaching, and then reattaching
101 // dragging out by the vector (dx, dy). 101 // dragging out by the vector (dx, dy).
102 void DetachReattachTest(aura::Window* window, int dx, int dy) { 102 void DetachReattachTest(aura::Window* window, int dx, int dy) {
103 wm::WindowState* window_state = wm::GetWindowState(window); 103 wm::WindowState* window_state = wm::GetWindowState(window);
104 EXPECT_TRUE(window_state->panel_attached()); 104 EXPECT_TRUE(window_state->panel_attached());
105 aura::RootWindow* root_window = window->GetRootWindow(); 105 aura::Window* root_window = window->GetRootWindow();
106 EXPECT_EQ(internal::kShellWindowId_PanelContainer, window->parent()->id()); 106 EXPECT_EQ(internal::kShellWindowId_PanelContainer, window->parent()->id());
107 DragStart(window); 107 DragStart(window);
108 gfx::Rect initial_bounds = window->GetBoundsInScreen(); 108 gfx::Rect initial_bounds = window->GetBoundsInScreen();
109 109
110 // Drag the panel slightly. The window should still be snapped to the 110 // Drag the panel slightly. The window should still be snapped to the
111 // launcher. 111 // launcher.
112 DragMove(dx * 5, dy * 5); 112 DragMove(dx * 5, dy * 5);
113 EXPECT_EQ(initial_bounds.x(), window->GetBoundsInScreen().x()); 113 EXPECT_EQ(initial_bounds.x(), window->GetBoundsInScreen().x());
114 EXPECT_EQ(initial_bounds.y(), window->GetBoundsInScreen().y()); 114 EXPECT_EQ(initial_bounds.y(), window->GetBoundsInScreen().y());
115 115
(...skipping 411 matching lines...) Expand 10 before | Expand all | Expand 10 after
527 527
528 INSTANTIATE_TEST_CASE_P(LtrRtl, PanelWindowResizerTextDirectionTest, 528 INSTANTIATE_TEST_CASE_P(LtrRtl, PanelWindowResizerTextDirectionTest,
529 testing::Bool()); 529 testing::Bool());
530 INSTANTIATE_TEST_CASE_P(NormalPanelPopup, PanelWindowResizerTransientTest, 530 INSTANTIATE_TEST_CASE_P(NormalPanelPopup, PanelWindowResizerTransientTest,
531 testing::Values(aura::client::WINDOW_TYPE_NORMAL, 531 testing::Values(aura::client::WINDOW_TYPE_NORMAL,
532 aura::client::WINDOW_TYPE_PANEL, 532 aura::client::WINDOW_TYPE_PANEL,
533 aura::client::WINDOW_TYPE_POPUP)); 533 aura::client::WINDOW_TYPE_POPUP));
534 534
535 } // namespace internal 535 } // namespace internal
536 } // namespace ash 536 } // namespace ash
OLDNEW
« no previous file with comments | « ash/wm/panels/panel_window_resizer.cc ('k') | ash/wm/partial_screenshot_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698