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

Side by Side Diff: trunk/src/ash/wm/dock/docked_window_resizer_unittest.cc

Issue 59153004: Revert 233787 "Eliminate Shell::RootWindowList in favor of aura:..." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 7 years, 1 month 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 | « trunk/src/ash/wm/ash_native_cursor_manager.cc ('k') | trunk/src/ash/wm/drag_window_resizer.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/dock/docked_window_resizer.h" 5 #include "ash/wm/dock/docked_window_resizer.h"
6 6
7 #include "ash/ash_switches.h" 7 #include "ash/ash_switches.h"
8 #include "ash/launcher/launcher.h" 8 #include "ash/launcher/launcher.h"
9 #include "ash/launcher/launcher_model.h" 9 #include "ash/launcher/launcher_model.h"
10 #include "ash/root_window_controller.h" 10 #include "ash/root_window_controller.h"
(...skipping 596 matching lines...) Expand 10 before | Expand all | Expand 10 after
607 DragRevert(); 607 DragRevert();
608 EXPECT_EQ(previous_container_id, window->parent()->id()); 608 EXPECT_EQ(previous_container_id, window->parent()->id());
609 } 609 }
610 610
611 // Move a docked window to the second display 611 // Move a docked window to the second display
612 TEST_P(DockedWindowResizerTest, DragAcrossDisplays) { 612 TEST_P(DockedWindowResizerTest, DragAcrossDisplays) {
613 if (!SupportsMultipleDisplays()) 613 if (!SupportsMultipleDisplays())
614 return; 614 return;
615 615
616 UpdateDisplay("800x800,800x800"); 616 UpdateDisplay("800x800,800x800");
617 aura::Window::Windows root_windows = Shell::GetAllRootWindows(); 617 Shell::RootWindowList root_windows = Shell::GetAllRootWindows();
618 EXPECT_EQ(2, static_cast<int>(root_windows.size())); 618 EXPECT_EQ(2, static_cast<int>(root_windows.size()));
619 scoped_ptr<aura::Window> window(CreateTestWindow(gfx::Rect(0, 0, 201, 201))); 619 scoped_ptr<aura::Window> window(CreateTestWindow(gfx::Rect(0, 0, 201, 201)));
620 gfx::Rect initial_bounds = window->GetBoundsInScreen(); 620 gfx::Rect initial_bounds = window->GetBoundsInScreen();
621 EXPECT_EQ(root_windows[0], window->GetRootWindow()); 621 EXPECT_EQ(root_windows[0], window->GetRootWindow());
622 622
623 DragRelativeToEdge(DOCKED_EDGE_RIGHT, window.get(), 0); 623 DragRelativeToEdge(DOCKED_EDGE_RIGHT, window.get(), 0);
624 // The window should be attached and snapped to the right edge. 624 // The window should be attached and snapped to the right edge.
625 EXPECT_EQ(window->GetRootWindow()->bounds().right(), 625 EXPECT_EQ(window->GetRootWindow()->bounds().right(),
626 window->GetBoundsInScreen().right()); 626 window->GetBoundsInScreen().right());
627 EXPECT_EQ(internal::kShellWindowId_DockedContainer, window->parent()->id()); 627 EXPECT_EQ(internal::kShellWindowId_DockedContainer, window->parent()->id());
(...skipping 543 matching lines...) Expand 10 before | Expand all | Expand 10 after
1171 child->GetBoundsInScreen().origin().ToString()); 1171 child->GetBoundsInScreen().origin().ToString());
1172 } 1172 }
1173 1173
1174 // Tests run twice - on both panels and normal windows 1174 // Tests run twice - on both panels and normal windows
1175 INSTANTIATE_TEST_CASE_P(NormalOrPanel, 1175 INSTANTIATE_TEST_CASE_P(NormalOrPanel,
1176 DockedWindowResizerTest, 1176 DockedWindowResizerTest,
1177 testing::Values(aura::client::WINDOW_TYPE_NORMAL, 1177 testing::Values(aura::client::WINDOW_TYPE_NORMAL,
1178 aura::client::WINDOW_TYPE_PANEL)); 1178 aura::client::WINDOW_TYPE_PANEL));
1179 } // namespace internal 1179 } // namespace internal
1180 } // namespace ash 1180 } // namespace ash
OLDNEW
« no previous file with comments | « trunk/src/ash/wm/ash_native_cursor_manager.cc ('k') | trunk/src/ash/wm/drag_window_resizer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698