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

Unified Diff: ash/extended_desktop_unittest.cc

Issue 10870036: Allow storing display preferences per device. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ash/display/mouse_cursor_event_filter_unittest.cc ('k') | ash/shell.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/extended_desktop_unittest.cc
diff --git a/ash/extended_desktop_unittest.cc b/ash/extended_desktop_unittest.cc
index 572bb68982580a6ded93d081942c416e9c647935..5b65afe46441d820b7369ba3cdd3b1b5f91b0acc 100644
--- a/ash/extended_desktop_unittest.cc
+++ b/ash/extended_desktop_unittest.cc
@@ -44,6 +44,14 @@ views::Widget* CreateTestWidget(const gfx::Rect& bounds) {
return CreateTestWidgetWithParent(NULL, bounds, false);
}
+void SetSecondaryDisplayLayout(DisplayLayout::Position position) {
+ DisplayController* display_controller =
+ Shell::GetInstance()->display_controller();
+ DisplayLayout layout = display_controller->default_display_layout();
+ layout.position = position;
+ display_controller->SetDefaultDisplayLayout(layout);
+}
+
class ModalWidgetDelegate : public views::WidgetDelegateView {
public:
ModalWidgetDelegate() {}
@@ -242,8 +250,7 @@ TEST_F(ExtendedDesktopTest, CycleWindows) {
TEST_F(ExtendedDesktopTest, GetRootWindowAt) {
UpdateDisplay("700x500,500x500");
- Shell::GetInstance()->display_controller()->SetSecondaryDisplayLayout(
- internal::DisplayController::LEFT);
+ SetSecondaryDisplayLayout(DisplayLayout::LEFT);
Shell::RootWindowList root_windows = Shell::GetAllRootWindows();
EXPECT_EQ(root_windows[1], wm::GetRootWindowAt(gfx::Point(-400, 100)));
@@ -261,8 +268,7 @@ TEST_F(ExtendedDesktopTest, GetRootWindowAt) {
TEST_F(ExtendedDesktopTest, GetRootWindowMatching) {
UpdateDisplay("700x500,500x500");
- Shell::GetInstance()->display_controller()->SetSecondaryDisplayLayout(
- internal::DisplayController::LEFT);
+ SetSecondaryDisplayLayout(DisplayLayout::LEFT);
Shell::RootWindowList root_windows = Shell::GetAllRootWindows();
@@ -504,8 +510,7 @@ TEST_F(ExtendedDesktopTest, ConvertPoint) {
EXPECT_EQ("-1010,-10", p.ToString());
// Move the 2nd display to the bottom and test again.
- Shell::GetInstance()->display_controller()->SetSecondaryDisplayLayout(
- internal::DisplayController::BOTTOM);
+ SetSecondaryDisplayLayout(DisplayLayout::BOTTOM);
display_2 = GetDisplayManager()->FindDisplayForRootWindow(root_windows[1]);
EXPECT_EQ("0,600", display_2.bounds().origin().ToString());
« no previous file with comments | « ash/display/mouse_cursor_event_filter_unittest.cc ('k') | ash/shell.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698