diff options
author | oshima@chromium.org <oshima@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-02-28 14:37:34 +0000 |
---|---|---|
committer | oshima@chromium.org <oshima@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-02-28 14:37:34 +0000 |
commit | 7005d9fb0e445bab402cb2202bedb56cd53057d6 (patch) | |
tree | 7568b1863e8a6a3b2fa6ff3cbd06840b886a22b3 /ash/dip_unittest.cc | |
parent | a92ccf7474fa34018656e20d53aa922e1bad4f02 (diff) | |
download | chromium_src-7005d9fb0e445bab402cb2202bedb56cd53057d6.zip chromium_src-7005d9fb0e445bab402cb2202bedb56cd53057d6.tar.gz chromium_src-7005d9fb0e445bab402cb2202bedb56cd53057d6.tar.bz2 |
Revert "Refactor DisplayInfo/Display - 2nd try"
> This is a first step to fix overscan issue and implement
> screen rotation.
>
> * remove bounds_in_pixel from gfx::Display
> * promote DisplayInfo to separate class/file
> * All display information is now generated in display_change_observer_x11.cc.
> almost no X11 depenency in display_manager.cc
> (I'll move FindInternalDisplayID out from display_manager.cc once https://codereview.chromium.org/12217120/ is landed)
>
> This makes testing more consistent with real environment.
>
>* Add DisplayManager::ClearCustomOverscanInsets so that
> you can reset the insets to default value.
>* Removed obsolete AshTestBase::ChangeDisplayConfig
>
>BUG=174721,119268
>TEST=covered by test
>
BUG=174721,119268
Review URL: https://codereview.chromium.org/12374017
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@185243 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash/dip_unittest.cc')
-rw-r--r-- | ash/dip_unittest.cc | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/ash/dip_unittest.cc b/ash/dip_unittest.cc index 2c00d71a..1df1ec7 100644 --- a/ash/dip_unittest.cc +++ b/ash/dip_unittest.cc @@ -5,7 +5,6 @@ #include <algorithm> #include <vector> -#include "ash/display/display_manager.h" #include "ash/launcher/launcher.h" #include "ash/shell.h" #include "ash/test/ash_test_base.h" @@ -30,7 +29,7 @@ typedef ash::test::AshTestBase DIPTest; // Test if the WM sets correct work area under different density. TEST_F(DIPTest, WorkArea) { - UpdateDisplay("1000x900*1.0f"); + ChangeDisplayConfig(1.0f, gfx::Rect(0, 0, 1000, 900)); aura::RootWindow* root = Shell::GetPrimaryRootWindow(); const gfx::Display display = @@ -41,16 +40,13 @@ TEST_F(DIPTest, WorkArea) { EXPECT_EQ("0,0 1000x852", work_area.ToString()); EXPECT_EQ("0,0,48,0", display.bounds().InsetsFrom(work_area).ToString()); - UpdateDisplay("2000x1800*2.0f"); - gfx::Screen* screen = Shell::GetScreen(); + ChangeDisplayConfig(2.0f, gfx::Rect(0, 0, 2000, 1800)); - const gfx::Display display_2x = screen->GetDisplayNearestWindow(root); - const internal::DisplayInfo display_info_2x = - Shell::GetInstance()->display_manager()->GetDisplayInfo(display_2x); + const gfx::Display display_2x = + Shell::GetScreen()->GetDisplayNearestWindow(root); // The |bounds_in_pixel()| should report bounds in pixel coordinate. - EXPECT_EQ("1,1 2000x1800", - display_info_2x.bounds_in_pixel().ToString()); + EXPECT_EQ("0,0 2000x1800", display_2x.bounds_in_pixel().ToString()); // Aura and views coordinates are in DIP, so they their bounds do not change. EXPECT_EQ("0,0 1000x900", display_2x.bounds().ToString()); |