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

Side by Side Diff: ash/display/display_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/display/display_controller.cc ('k') | ash/display/multi_display_manager_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 6
7 #include "ash/shell.h" 7 #include "ash/shell.h"
8 #include "ash/test/ash_test_base.h" 8 #include "ash/test/ash_test_base.h"
9 #include "ui/aura/root_window.h" 9 #include "ui/aura/root_window.h"
10 #include "ui/gfx/display.h" 10 #include "ui/gfx/display.h"
(...skipping 11 matching lines...) Expand all
22 Shell::GetAllRootWindows()[0]); 22 Shell::GetAllRootWindows()[0]);
23 } 23 }
24 24
25 gfx::Display GetSecondaryDisplay() { 25 gfx::Display GetSecondaryDisplay() {
26 return gfx::Screen::GetDisplayNearestWindow( 26 return gfx::Screen::GetDisplayNearestWindow(
27 Shell::GetAllRootWindows()[1]); 27 Shell::GetAllRootWindows()[1]);
28 } 28 }
29 29
30 } // namespace 30 } // namespace
31 31
32 typedef test::AshTestBase DisplayControllerTest; 32 class DisplayControllerTest : public test::AshTestBase {
33 public:
34 DisplayControllerTest() {}
35 virtual ~DisplayControllerTest() {}
36
37 virtual void SetUp() OVERRIDE {
38 internal::DisplayController::SetExtendedDesktopEnabled(true);
39 AshTestBase::SetUp();
40 }
41
42 virtual void TearDown() OVERRIDE {
43 AshTestBase::TearDown();
44 internal::DisplayController::SetExtendedDesktopEnabled(false);
45 }
46
47 private:
48 DISALLOW_COPY_AND_ASSIGN(DisplayControllerTest);
49 };
33 50
34 #if defined(OS_WIN) 51 #if defined(OS_WIN)
35 // TOD(oshima): Windows creates a window with smaller client area. 52 // TOD(oshima): Windows creates a window with smaller client area.
36 // Fix this and enable tests. 53 // Fix this and enable tests.
37 #define MAYBE_SecondaryDisplayLayout DISABLED_SecondaryDisplayLayout 54 #define MAYBE_SecondaryDisplayLayout DISABLED_SecondaryDisplayLayout
38 #define MAYBE_BoundsUpdated DISABLED_BoundsUpdated 55 #define MAYBE_BoundsUpdated DISABLED_BoundsUpdated
39 #else 56 #else
40 #define MAYBE_SecondaryDisplayLayout SecondaryDisplayLayout 57 #define MAYBE_SecondaryDisplayLayout SecondaryDisplayLayout
41 #define MAYBE_BoundsUpdated BoundsUpdated 58 #define MAYBE_BoundsUpdated BoundsUpdated
42 #endif 59 #endif
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 EXPECT_EQ(1, gfx::Screen::GetNumDisplays()); 120 EXPECT_EQ(1, gfx::Screen::GetNumDisplays());
104 121
105 UpdateDisplay("700x700,1000x1000"); 122 UpdateDisplay("700x700,1000x1000");
106 ASSERT_EQ(2, gfx::Screen::GetNumDisplays()); 123 ASSERT_EQ(2, gfx::Screen::GetNumDisplays());
107 EXPECT_EQ("0,0 700x700", GetPrimaryDisplay().bounds().ToString()); 124 EXPECT_EQ("0,0 700x700", GetPrimaryDisplay().bounds().ToString());
108 EXPECT_EQ("0,700 1000x1000", GetSecondaryDisplay().bounds().ToString()); 125 EXPECT_EQ("0,700 1000x1000", GetSecondaryDisplay().bounds().ToString());
109 } 126 }
110 127
111 } // namespace test 128 } // namespace test
112 } // namespace ash 129 } // namespace ash
OLDNEW
« no previous file with comments | « ash/display/display_controller.cc ('k') | ash/display/multi_display_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698