diff options
author | oshima@chromium.org <oshima@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-07-18 16:40:06 +0000 |
---|---|---|
committer | oshima@chromium.org <oshima@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-07-18 16:40:06 +0000 |
commit | 8d625fbd16a1d20f5e34bd01b83b0402bd3b4c80 (patch) | |
tree | 4fd429027e6fe44e79e8395ae63d6542d7edf657 /ash/wm/panel_layout_manager_unittest.cc | |
parent | 87cc09add3a1a9ef94aaec1865fc3aaa23720aaa (diff) | |
download | chromium_src-8d625fbd16a1d20f5e34bd01b83b0402bd3b4c80.zip chromium_src-8d625fbd16a1d20f5e34bd01b83b0402bd3b4c80.tar.gz chromium_src-8d625fbd16a1d20f5e34bd01b83b0402bd3b4c80.tar.bz2 |
* Use Virtual Screen Coordinates in more places
- When setting widget bounds.
- Workspace Manager
- When resizing
- Restore bounds
* Refactored ScreenPositionClient to manage Screen coordinates for different configurations.
* Renamed GetBounds/SetBounds methods to GetScreen/ParentBounds to make it clear that in which coordinates you're dealing with.
* I used InScreen/InParent for RestoreBounds because RestoreParent/ScreenBounds sounds strange.
Converted Linux/Aura to use ScreenPositionClient.
BUG=123160
TEST=several tests are updated to match VSC. added screen_ash_unittests. I'll update rest of tests when this is enable by default.
Review URL: https://chromiumcodereview.appspot.com/10696023
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@147250 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash/wm/panel_layout_manager_unittest.cc')
-rw-r--r-- | ash/wm/panel_layout_manager_unittest.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/ash/wm/panel_layout_manager_unittest.cc b/ash/wm/panel_layout_manager_unittest.cc index 3a4fd37..7835575 100644 --- a/ash/wm/panel_layout_manager_unittest.cc +++ b/ash/wm/panel_layout_manager_unittest.cc @@ -80,7 +80,7 @@ class PanelLayoutManagerTest : public ash::test::AshTestBase { gfx::Rect icon_bounds = launcher->GetScreenBoundsOfItemIconForWindow(panel); ASSERT_FALSE(icon_bounds.IsEmpty()); - gfx::Rect window_bounds = panel->GetBoundsInRootWindow(); + gfx::Rect window_bounds = panel->GetRootWindowBounds(); // 1-pixel tolerance--since we center panels over their icons, panels with // odd pixel widths won't be perfectly lined up with even pixel width @@ -98,9 +98,9 @@ class PanelLayoutManagerTest : public ash::test::AshTestBase { views::Widget* widget = NULL; GetCalloutWidget(&widget); EXPECT_TRUE(widget->IsVisible()); - EXPECT_EQ(panel->GetBoundsInRootWindow().bottom(), + EXPECT_EQ(panel->GetRootWindowBounds().bottom(), widget->GetWindowScreenBounds().y()); - EXPECT_NEAR(panel->GetBoundsInRootWindow().CenterPoint().x(), + EXPECT_NEAR(panel->GetRootWindowBounds().CenterPoint().x(), widget->GetWindowScreenBounds().CenterPoint().x(), 1); } |