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

Unified Diff: ash/wm/toplevel_window_event_filter_unittest.cc

Issue 10442017: Rename GetRootWindow() -> GetPrimaryRootWindow() (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: git-try -b linux_chromeos,win_aura Created 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ash/wm/system_modal_container_layout_manager_unittest.cc ('k') | ash/wm/video_detector.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/toplevel_window_event_filter_unittest.cc
diff --git a/ash/wm/toplevel_window_event_filter_unittest.cc b/ash/wm/toplevel_window_event_filter_unittest.cc
index 1a52a221bb3fe8b601de0a71365b81758a252c06..3e709dfa55e4979d7e68f862e09ca1ab2e6045f1 100644
--- a/ash/wm/toplevel_window_event_filter_unittest.cc
+++ b/ash/wm/toplevel_window_event_filter_unittest.cc
@@ -73,8 +73,8 @@ class ToplevelWindowEventFilterTest : public AshTestBase {
parent_ = new aura::Window(NULL);
parent_->Init(ui::LAYER_NOT_DRAWN);
parent_->Show();
- Shell::GetRootWindow()->AddChild(parent_);
- parent_->SetBounds(Shell::GetRootWindow()->bounds());
+ Shell::GetPrimaryRootWindow()->AddChild(parent_);
+ parent_->SetBounds(Shell::GetPrimaryRootWindow()->bounds());
filter_ = new ToplevelWindowEventFilter(parent_);
parent_->SetEventFilter(filter_);
SetGridSize(0);
@@ -99,12 +99,12 @@ class ToplevelWindowEventFilterTest : public AshTestBase {
}
void DragFromCenterBy(aura::Window* window, int dx, int dy) {
- aura::test::EventGenerator generator(Shell::GetRootWindow(), window);
+ aura::test::EventGenerator generator(Shell::GetPrimaryRootWindow(), window);
generator.DragMouseBy(dx, dy);
}
void TouchDragFromCenterBy(aura::Window* window, int dx, int dy) {
- aura::test::EventGenerator generator(Shell::GetRootWindow(), window);
+ aura::test::EventGenerator generator(Shell::GetPrimaryRootWindow(), window);
generator.PressMoveAndReleaseTouchBy(dx, dy);
}
@@ -157,7 +157,7 @@ TEST_F(ToplevelWindowEventFilterTest, GrowBox) {
window_delegate->set_min_size(gfx::Size(40, 40));
gfx::Point position = w1->bounds().origin();
- aura::test::EventGenerator generator(Shell::GetRootWindow());
+ aura::test::EventGenerator generator(Shell::GetPrimaryRootWindow());
generator.MoveMouseToCenterOf(w1.get());
generator.DragMouseBy(100, 100);
// Position should not have changed.
@@ -337,7 +337,7 @@ TEST_F(ToplevelWindowEventFilterTest, DoubleClickCaptionTogglesMaximize) {
scoped_ptr<aura::Window> w1(CreateWindow(HTCAPTION));
EXPECT_FALSE(wm::IsWindowMaximized(w1.get()));
- aura::test::EventGenerator generator(Shell::GetRootWindow(), w1.get());
+ aura::test::EventGenerator generator(Shell::GetPrimaryRootWindow(), w1.get());
generator.DoubleClickLeftButton();
EXPECT_TRUE(wm::IsWindowMaximized(w1.get()));
@@ -392,7 +392,8 @@ TEST_F(ToplevelWindowEventFilterTest, BottomWorkArea) {
// Verifies we don't let windows drag to a -y location.
TEST_F(ToplevelWindowEventFilterTest, DontDragToNegativeY) {
scoped_ptr<aura::Window> target(CreateWindow(HTTOP));
- aura::test::EventGenerator generator(Shell::GetRootWindow(), target.get());
+ aura::test::EventGenerator generator(Shell::GetPrimaryRootWindow(),
+ target.get());
generator.MoveMouseTo(0, 5);
generator.DragMouseBy(0, -5);
// The y location and height should not have changed.
@@ -430,7 +431,8 @@ TEST_F(ToplevelWindowEventFilterTest, ResizeSnaps) {
TEST_F(ToplevelWindowEventFilterTest, DragSnaps) {
SetGridSize(8);
scoped_ptr<aura::Window> target(CreateWindow(HTCAPTION));
- aura::test::EventGenerator generator(Shell::GetRootWindow(), target.get());
+ aura::test::EventGenerator generator(Shell::GetPrimaryRootWindow(),
+ target.get());
generator.PressLeftButton();
generator.MoveMouseTo(generator.current_location().Add(gfx::Point(11, 21)));
@@ -452,13 +454,14 @@ TEST_F(ToplevelWindowEventFilterTest, DragSnaps) {
#define MAYBE_EscapeReverts EscapeReverts
#endif
TEST_F(ToplevelWindowEventFilterTest, MAYBE_EscapeReverts) {
- aura::RootWindow* root = Shell::GetRootWindow();
+ aura::RootWindow* root = Shell::GetPrimaryRootWindow();
aura::client::ActivationClient* original_client =
aura::client::GetActivationClient(root);
aura::test::TestActivationClient activation_client(root);
scoped_ptr<aura::Window> target(CreateWindow(HTBOTTOMRIGHT));
target->Focus();
- aura::test::EventGenerator generator(Shell::GetRootWindow(), target.get());
+ aura::test::EventGenerator generator(Shell::GetPrimaryRootWindow(),
+ target.get());
generator.PressLeftButton();
generator.MoveMouseTo(generator.current_location().Add(gfx::Point(10, 11)));
« no previous file with comments | « ash/wm/system_modal_container_layout_manager_unittest.cc ('k') | ash/wm/video_detector.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698