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

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

Issue 1177863002: ash: Restore user selected rotation on startup (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 5 years, 6 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
« no previous file with comments | « ash/display/display_manager.cc ('k') | no next file » | 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_manager.h" 5 #include "ash/display/display_manager.h"
6 6
7 #include "ash/ash_switches.h" 7 #include "ash/ash_switches.h"
8 #include "ash/display/display_controller.h" 8 #include "ash/display/display_controller.h"
9 #include "ash/display/display_info.h" 9 #include "ash/display/display_info.h"
10 #include "ash/display/display_layout_store.h" 10 #include "ash/display/display_layout_store.h"
(...skipping 1743 matching lines...) Expand 10 before | Expand all | Expand 10 after
1754 Shell::GetScreen()->GetPrimaryDisplay().id(), 0.8f); 1754 Shell::GetScreen()->GetPrimaryDisplay().id(), 0.8f);
1755 1755
1756 ASSERT_DOUBLE_EQ( 1756 ASSERT_DOUBLE_EQ(
1757 1.25f, Shell::GetScreen()->GetPrimaryDisplay().device_scale_factor()); 1757 1.25f, Shell::GetScreen()->GetPrimaryDisplay().device_scale_factor());
1758 EXPECT_TRUE(IsTextSubpixelPositioningEnabled()); 1758 EXPECT_TRUE(IsTextSubpixelPositioningEnabled());
1759 EXPECT_EQ(gfx::FontRenderParams::HINTING_NONE, GetFontHintingParams()); 1759 EXPECT_EQ(gfx::FontRenderParams::HINTING_NONE, GetFontHintingParams());
1760 1760
1761 DisplayInfo::SetUse125DSFForUIScaling(false); 1761 DisplayInfo::SetUse125DSFForUIScaling(false);
1762 } 1762 }
1763 1763
1764 TEST_F(DisplayManagerTest, CheckInitializationOfRotationProperty) {
1765 int64_t id = display_manager()->GetDisplayAt(0).id();
1766 display_manager()->RegisterDisplayProperty(id, gfx::Display::ROTATE_90, 1.0f,
1767 nullptr, gfx::Size(), 1.0f,
1768 ui::COLOR_PROFILE_STANDARD);
1769
1770 const DisplayInfo& info = display_manager()->GetDisplayInfo(id);
1771
1772 EXPECT_EQ(gfx::Display::ROTATE_90,
1773 info.GetRotation(gfx::Display::ROTATION_SOURCE_USER));
1774 EXPECT_EQ(gfx::Display::ROTATE_90,
1775 info.GetRotation(gfx::Display::ROTATION_SOURCE_ACTIVE));
1776 }
1777
1764 #endif // OS_CHROMEOS 1778 #endif // OS_CHROMEOS
1765 1779
1766 } // namespace ash 1780 } // namespace ash
OLDNEW
« no previous file with comments | « ash/display/display_manager.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698