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

Side by Side Diff: ash/display/display_controller_unittest.cc

Issue 10800095: Enable extended desktop by default. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix resource Created 8 years, 5 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 class DisplayControllerTest : public test::AshTestBase { 32 typedef test::AshTestBase DisplayControllerTest;
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 };
50 33
51 #if defined(OS_WIN) 34 #if defined(OS_WIN)
52 // TOD(oshima): Windows creates a window with smaller client area. 35 // TOD(oshima): Windows creates a window with smaller client area.
53 // Fix this and enable tests. 36 // Fix this and enable tests.
54 #define MAYBE_SecondaryDisplayLayout DISABLED_SecondaryDisplayLayout 37 #define MAYBE_SecondaryDisplayLayout DISABLED_SecondaryDisplayLayout
55 #define MAYBE_BoundsUpdated DISABLED_BoundsUpdated 38 #define MAYBE_BoundsUpdated DISABLED_BoundsUpdated
56 #else 39 #else
57 #define MAYBE_SecondaryDisplayLayout SecondaryDisplayLayout 40 #define MAYBE_SecondaryDisplayLayout SecondaryDisplayLayout
58 #define MAYBE_BoundsUpdated BoundsUpdated 41 #define MAYBE_BoundsUpdated BoundsUpdated
59 #endif 42 #endif
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 EXPECT_EQ(1, gfx::Screen::GetNumDisplays()); 103 EXPECT_EQ(1, gfx::Screen::GetNumDisplays());
121 104
122 UpdateDisplay("700x700,1000x1000"); 105 UpdateDisplay("700x700,1000x1000");
123 ASSERT_EQ(2, gfx::Screen::GetNumDisplays()); 106 ASSERT_EQ(2, gfx::Screen::GetNumDisplays());
124 EXPECT_EQ("0,0 700x700", GetPrimaryDisplay().bounds().ToString()); 107 EXPECT_EQ("0,0 700x700", GetPrimaryDisplay().bounds().ToString());
125 EXPECT_EQ("0,700 1000x1000", GetSecondaryDisplay().bounds().ToString()); 108 EXPECT_EQ("0,700 1000x1000", GetSecondaryDisplay().bounds().ToString());
126 } 109 }
127 110
128 } // namespace test 111 } // namespace test
129 } // namespace ash 112 } // 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