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

Side by Side Diff: ash/root_window_controller_unittest.cc

Issue 10827184: Disabling extended desktop (by default). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased. Created 8 years, 4 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/extended_desktop_unittest.cc ('k') | ash/screen_ash_unittest.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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/display/display_controller.h" 5 #include "ash/display/display_controller.h"
6 #include "ash/display/multi_display_manager.h" 6 #include "ash/display/multi_display_manager.h"
7 #include "ash/shell.h" 7 #include "ash/shell.h"
8 #include "ash/shell_window_ids.h" 8 #include "ash/shell_window_ids.h"
9 #include "ash/test/ash_test_base.h" 9 #include "ash/test/ash_test_base.h"
10 #include "ash/wm/window_util.h" 10 #include "ash/wm/window_util.h"
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 54
55 aura::Window* GetModalContainer(aura::RootWindow* root_window) { 55 aura::Window* GetModalContainer(aura::RootWindow* root_window) {
56 return Shell::GetContainer( 56 return Shell::GetContainer(
57 root_window, 57 root_window,
58 ash::internal::kShellWindowId_SystemModalContainer); 58 ash::internal::kShellWindowId_SystemModalContainer);
59 } 59 }
60 60
61 } // namespace 61 } // namespace
62 62
63 namespace test { 63 namespace test {
64 class RootWindowControllerTest : public test::AshTestBase {
65 public:
66 RootWindowControllerTest() {}
67 virtual ~RootWindowControllerTest() {}
64 68
65 typedef test::AshTestBase RootWindowControllerTest; 69 virtual void SetUp() OVERRIDE {
70 internal::DisplayController::SetExtendedDesktopEnabled(true);
71 AshTestBase::SetUp();
72 }
73
74 virtual void TearDown() OVERRIDE {
75 AshTestBase::TearDown();
76 internal::DisplayController::SetExtendedDesktopEnabled(false);
77 }
78
79 private:
80 DISALLOW_COPY_AND_ASSIGN(RootWindowControllerTest);
81 };
66 82
67 TEST_F(RootWindowControllerTest, MoveWindows_Basic) { 83 TEST_F(RootWindowControllerTest, MoveWindows_Basic) {
68 UpdateDisplay("600x600,500x500"); 84 UpdateDisplay("600x600,500x500");
69 Shell::RootWindowList root_windows = Shell::GetAllRootWindows(); 85 Shell::RootWindowList root_windows = Shell::GetAllRootWindows();
70 86
71 views::Widget* normal = CreateTestWidget(gfx::Rect(650, 10, 100, 100)); 87 views::Widget* normal = CreateTestWidget(gfx::Rect(650, 10, 100, 100));
72 EXPECT_EQ(root_windows[1], normal->GetNativeView()->GetRootWindow()); 88 EXPECT_EQ(root_windows[1], normal->GetNativeView()->GetRootWindow());
73 EXPECT_EQ("650,10 100x100", normal->GetWindowBoundsInScreen().ToString()); 89 EXPECT_EQ("650,10 100x100", normal->GetWindowBoundsInScreen().ToString());
74 EXPECT_EQ("50,10 100x100", 90 EXPECT_EQ("50,10 100x100",
75 normal->GetNativeView()->GetBoundsInRootWindow().ToString()); 91 normal->GetNativeView()->GetBoundsInRootWindow().ToString());
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 180
165 UpdateDisplay("500x500"); 181 UpdateDisplay("500x500");
166 EXPECT_EQ(root_windows[0], modal->GetNativeView()->GetRootWindow()); 182 EXPECT_EQ(root_windows[0], modal->GetNativeView()->GetRootWindow());
167 EXPECT_TRUE(wm::IsActiveWindow(modal->GetNativeView())); 183 EXPECT_TRUE(wm::IsActiveWindow(modal->GetNativeView()));
168 generator_1st.ClickLeftButton(); 184 generator_1st.ClickLeftButton();
169 EXPECT_TRUE(wm::IsActiveWindow(modal->GetNativeView())); 185 EXPECT_TRUE(wm::IsActiveWindow(modal->GetNativeView()));
170 } 186 }
171 187
172 } // namespace test 188 } // namespace test
173 } // namespace ash 189 } // namespace ash
OLDNEW
« no previous file with comments | « ash/extended_desktop_unittest.cc ('k') | ash/screen_ash_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698