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

Unified Diff: ash/display/screen_position_controller_unittest.cc

Issue 64933002: Eliminate Shell::RootWindowList in favor of aura::Window::Windows. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
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 side-by-side diff with in-line comments
Download patch
Index: ash/display/screen_position_controller_unittest.cc
diff --git a/ash/display/screen_position_controller_unittest.cc b/ash/display/screen_position_controller_unittest.cc
index 2cd61332c62df2b1fd93225b8aed020fa8dbcdae..f3b8d655c35277aee553f7afe56cefacea558983 100644
--- a/ash/display/screen_position_controller_unittest.cc
+++ b/ash/display/screen_position_controller_unittest.cc
@@ -87,12 +87,16 @@ class ScreenPositionControllerTest : public test::AshTestBase {
TEST_F(ScreenPositionControllerTest, MAYBE_ConvertHostPointToScreen) {
UpdateDisplay("100+100-200x200,100+500-200x200");
- Shell::RootWindowList root_windows =
+ aura::Window::Windows root_windows =
Shell::GetInstance()->GetAllRootWindows();
- EXPECT_EQ("100,100", root_windows[0]->GetHostOrigin().ToString());
- EXPECT_EQ("200x200", root_windows[0]->GetHostSize().ToString());
- EXPECT_EQ("100,500", root_windows[1]->GetHostOrigin().ToString());
- EXPECT_EQ("200x200", root_windows[1]->GetHostSize().ToString());
+ EXPECT_EQ("100,100",
+ root_windows[0]->GetDispatcher()->GetHostOrigin().ToString());
+ EXPECT_EQ("200x200",
+ root_windows[0]->GetDispatcher()->GetHostSize().ToString());
+ EXPECT_EQ("100,500",
+ root_windows[1]->GetDispatcher()->GetHostOrigin().ToString());
+ EXPECT_EQ("200x200",
+ root_windows[1]->GetDispatcher()->GetHostSize().ToString());
const gfx::Point window_pos(100, 100);
window_->SetBoundsInScreen(
@@ -171,12 +175,16 @@ TEST_F(ScreenPositionControllerTest, MAYBE_ConvertHostPointToScreen) {
TEST_F(ScreenPositionControllerTest, MAYBE_ConvertHostPointToScreenHiDPI) {
UpdateDisplay("100+100-200x200*2,100+500-200x200");
- Shell::RootWindowList root_windows =
+ aura::Window::Windows root_windows =
Shell::GetInstance()->GetAllRootWindows();
- EXPECT_EQ("100,100", root_windows[0]->GetHostOrigin().ToString());
- EXPECT_EQ("200x200", root_windows[0]->GetHostSize().ToString());
- EXPECT_EQ("100,500", root_windows[1]->GetHostOrigin().ToString());
- EXPECT_EQ("200x200", root_windows[1]->GetHostSize().ToString());
+ EXPECT_EQ("100,100",
+ root_windows[0]->GetDispatcher()->GetHostOrigin().ToString());
+ EXPECT_EQ("200x200",
+ root_windows[0]->GetDispatcher()->GetHostSize().ToString());
+ EXPECT_EQ("100,500",
+ root_windows[1]->GetDispatcher()->GetHostOrigin().ToString());
+ EXPECT_EQ("200x200",
+ root_windows[1]->GetDispatcher()->GetHostSize().ToString());
// Put |window_| to the primary 2x display.
window_->SetBoundsInScreen(gfx::Rect(20, 20, 50, 50),
@@ -219,7 +227,7 @@ TEST_F(ScreenPositionControllerTest, MAYBE_ConvertHostPointToScreenRotate) {
// Move |window_| to the 2nd.
window_->SetBoundsInScreen(gfx::Rect(300, 20, 50, 50),
ScreenAsh::GetSecondaryDisplay());
- Shell::RootWindowList root_windows =
+ aura::Window::Windows root_windows =
Shell::GetInstance()->GetAllRootWindows();
EXPECT_EQ(root_windows[1], window_->GetRootWindow());
@@ -251,7 +259,7 @@ TEST_F(ScreenPositionControllerTest, MAYBE_ConvertHostPointToScreenUIScale) {
// Move |window_| to the 2nd.
window_->SetBoundsInScreen(gfx::Rect(300, 20, 50, 50),
ScreenAsh::GetSecondaryDisplay());
- Shell::RootWindowList root_windows =
+ aura::Window::Windows root_windows =
Shell::GetInstance()->GetAllRootWindows();
EXPECT_EQ(root_windows[1], window_->GetRootWindow());

Powered by Google App Engine
This is Rietveld 408576698