diff options
author | fgorski@chromium.org <fgorski@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-05-22 23:08:04 +0000 |
---|---|---|
committer | fgorski@chromium.org <fgorski@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-05-22 23:08:04 +0000 |
commit | b6f34fbeb011683117b33639ca78d66ff32d5bfd (patch) | |
tree | 8539c4cc395ddc3de5f7a37c50ef4287154dd647 /ash | |
parent | 40e3850331fee90d4964f18d466fa82d1634d98b (diff) | |
download | chromium_src-b6f34fbeb011683117b33639ca78d66ff32d5bfd.zip chromium_src-b6f34fbeb011683117b33639ca78d66ff32d5bfd.tar.gz chromium_src-b6f34fbeb011683117b33639ca78d66ff32d5bfd.tar.bz2 |
Revert 272352 "Reland Linux Window Control Alignment"
> Reland Linux Window Control Alignment
>
> Modifying CustomFrameView to layout window controls based on user configurations. For linux begin observing the configs and changes. For other systems fall back on a default ordering.
>
> Update tests that were originally missed.
>
> Original review: https://codereview.chromium.org/240163006/
> Revert review: https://codereview.chromium.org/276173002/
> Revert "Revert of Linux Aura Task Manager Frame Buttons Misaligned (https://codereview.chromium.org/240163006/)"
>
> This reverts commit 9031ef57ba679037fc675bf2f081f3880380de3a.
>
> TEST=CustomFrameViewTest
> BUG=351917
>
> Review URL: https://codereview.chromium.org/281353009
TBR=jonross@chromium.org
Review URL: https://codereview.chromium.org/294473016
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@272356 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash')
-rw-r--r-- | ash/extended_desktop_unittest.cc | 6 | ||||
-rw-r--r-- | ash/wm/system_gesture_event_filter_unittest.cc | 21 |
2 files changed, 5 insertions, 22 deletions
diff --git a/ash/extended_desktop_unittest.cc b/ash/extended_desktop_unittest.cc index eb8591d..4ad8301 100644 --- a/ash/extended_desktop_unittest.cc +++ b/ash/extended_desktop_unittest.cc @@ -518,7 +518,7 @@ TEST_F(ExtendedDesktopTest, MoveWindowWithTransient) { w1, gfx::Rect(50, 50, 50, 50), false /* transient */); // Transient child of the transient child. views::Widget* w1_t11 = CreateTestWidgetWithParent( - w1_t1, gfx::Rect(1200, 70, 35, 35), false /* transient */); + w1_t1, gfx::Rect(1200, 70, 30, 30), false /* transient */); views::Widget* w11 = CreateTestWidgetWithParent( w1, gfx::Rect(10, 10, 40, 40), true /* child */); @@ -532,7 +532,7 @@ TEST_F(ExtendedDesktopTest, MoveWindowWithTransient) { EXPECT_EQ(root_windows[0], w11_t1->GetNativeView()->GetRootWindow()); EXPECT_EQ("50,50 50x50", w1_t1->GetWindowBoundsInScreen().ToString()); - EXPECT_EQ("1200,70 35x35", + EXPECT_EQ("1200,70 30x30", w1_t11->GetWindowBoundsInScreen().ToString()); EXPECT_EQ("20,20 40x40", w11->GetWindowBoundsInScreen().ToString()); @@ -552,7 +552,7 @@ TEST_F(ExtendedDesktopTest, MoveWindowWithTransient) { // Transient window's screen bounds stays the same. EXPECT_EQ("50,50 50x50", w1_t1->GetWindowBoundsInScreen().ToString()); - EXPECT_EQ("1200,70 35x35", + EXPECT_EQ("1200,70 30x30", w1_t11->GetWindowBoundsInScreen().ToString()); EXPECT_EQ("1300,100 80x80", w11_t1->GetWindowBoundsInScreen().ToString()); diff --git a/ash/wm/system_gesture_event_filter_unittest.cc b/ash/wm/system_gesture_event_filter_unittest.cc index ee2a20f..072a714 100644 --- a/ash/wm/system_gesture_event_filter_unittest.cc +++ b/ash/wm/system_gesture_event_filter_unittest.cc @@ -4,8 +4,6 @@ #include "ash/wm/system_gesture_event_filter.h" -#include <vector> - #include "ash/accelerators/accelerator_controller.h" #include "ash/ash_switches.h" #include "ash/display/display_manager.h" @@ -40,7 +38,6 @@ #include "ui/views/widget/widget.h" #include "ui/views/widget/widget_delegate.h" #include "ui/views/window/non_client_view.h" -#include "ui/views/window/window_button_order_provider.h" namespace ash { namespace test { @@ -141,20 +138,6 @@ class SystemGestureEventFilterTest // Overridden from AshTestBase: virtual void SetUp() OVERRIDE { - // TODO(jonross): TwoFingerDragDelayed() and ThreeFingerGestureStopsDrag() - // both use hardcoded touch points, assuming that they target empty header - // space. Window control order now reflects configuration files and can - // change. The tests should be improved to dynamically decide touch points. - // To address this we specify the originally expected window control - // positions to be consistent across tests. - std::vector<views::FrameButton> leading; - std::vector<views::FrameButton> trailing; - trailing.push_back(views::FRAME_BUTTON_MINIMIZE); - trailing.push_back(views::FRAME_BUTTON_MAXIMIZE); - trailing.push_back(views::FRAME_BUTTON_CLOSE); - views::WindowButtonOrderProvider::GetInstance()-> - SetWindowButtonOrder(leading, trailing); - if (!docked_enabled_) { CommandLine::ForCurrentProcess()->AppendSwitch( ash::switches::kAshDisableDockedWindows); @@ -454,7 +437,7 @@ TEST_P(SystemGestureEventFilterTest, } TEST_P(SystemGestureEventFilterTest, TwoFingerDragDelayed) { - gfx::Rect bounds(0, 0, 200, 100); + gfx::Rect bounds(0, 0, 100, 100); aura::Window* root_window = Shell::GetPrimaryRootWindow(); views::Widget* toplevel = views::Widget::CreateWindowWithContextAndBounds( new ResizableWidgetDelegate, root_window, bounds); @@ -489,7 +472,7 @@ TEST_P(SystemGestureEventFilterTest, TwoFingerDragDelayed) { } TEST_P(SystemGestureEventFilterTest, ThreeFingerGestureStopsDrag) { - gfx::Rect bounds(0, 0, 200, 100); + gfx::Rect bounds(0, 0, 100, 100); aura::Window* root_window = Shell::GetPrimaryRootWindow(); views::Widget* toplevel = views::Widget::CreateWindowWithContextAndBounds( new ResizableWidgetDelegate, root_window, bounds); |