| Index: ash/wm/custom_frame_view_ash_unittest.cc
|
| diff --git a/ash/wm/custom_frame_view_ash_unittest.cc b/ash/wm/custom_frame_view_ash_unittest.cc
|
| index 8036cc65092163211f151d0b3de70fafafffe6a4..ab64e22d0936fa1a1b1b5d211b1da0b9399e9743 100644
|
| --- a/ash/wm/custom_frame_view_ash_unittest.cc
|
| +++ b/ash/wm/custom_frame_view_ash_unittest.cc
|
| @@ -201,7 +201,7 @@ TEST_F(CustomFrameViewAshTest, MAYBE_ResizeButtonDrag) {
|
| EXPECT_FALSE(ash::wm::IsWindowMinimized(window));
|
| internal::SnapSizer sizer(window, center,
|
| internal::SnapSizer::RIGHT_EDGE,
|
| - internal::SnapSizer::OTHER_INPUT);
|
| + internal::SnapSizer::STEP_NO);
|
| EXPECT_EQ(sizer.target_bounds().ToString(), window->bounds().ToString());
|
| }
|
|
|
| @@ -218,7 +218,7 @@ TEST_F(CustomFrameViewAshTest, MAYBE_ResizeButtonDrag) {
|
| EXPECT_FALSE(ash::wm::IsWindowMinimized(window));
|
| internal::SnapSizer sizer(window, center,
|
| internal::SnapSizer::LEFT_EDGE,
|
| - internal::SnapSizer::OTHER_INPUT);
|
| + internal::SnapSizer::STEP_NO);
|
| EXPECT_EQ(sizer.target_bounds().ToString(), window->bounds().ToString());
|
| }
|
|
|
| @@ -250,9 +250,10 @@ TEST_F(CustomFrameViewAshTest, MAYBE_ResizeButtonDrag) {
|
|
|
| EXPECT_FALSE(ash::wm::IsWindowMaximized(window));
|
| EXPECT_FALSE(ash::wm::IsWindowMinimized(window));
|
| - // This is a short resizing distance and different touch behavior
|
| - // applies which leads in half of the screen being used.
|
| - EXPECT_EQ("400,0 400x552", window->bounds().ToString());
|
| + internal::SnapSizer sizer(window, center,
|
| + internal::SnapSizer::RIGHT_EDGE,
|
| + internal::SnapSizer::STEP_NO);
|
| + EXPECT_EQ(sizer.target_bounds().ToString(), window->bounds().ToString());
|
| }
|
|
|
| // Snap left.
|
| @@ -269,7 +270,7 @@ TEST_F(CustomFrameViewAshTest, MAYBE_ResizeButtonDrag) {
|
| EXPECT_FALSE(ash::wm::IsWindowMinimized(window));
|
| internal::SnapSizer sizer(window, center,
|
| internal::SnapSizer::LEFT_EDGE,
|
| - internal::SnapSizer::OTHER_INPUT);
|
| + internal::SnapSizer::STEP_NO);
|
| EXPECT_EQ(sizer.target_bounds().ToString(), window->bounds().ToString());
|
| }
|
|
|
| @@ -289,67 +290,6 @@ TEST_F(CustomFrameViewAshTest, MAYBE_ResizeButtonDrag) {
|
| // Test with gesture events.
|
| }
|
|
|
| -#if defined(OS_WIN)
|
| -// RootWindow and Display can't resize on Windows Ash. http://crbug.com/165962
|
| -#define MAYBE_TouchDragResizeCloseToCornerDiffersFromMouse \
|
| - DISABLED_TouchDragResizeCloseToCornerDiffersFromMouse
|
| -#else
|
| -#define MAYBE_TouchDragResizeCloseToCornerDiffersFromMouse \
|
| - TouchDragResizeCloseToCornerDiffersFromMouse
|
| -#endif
|
| -
|
| -// Tests Left/Right snapping with resize button touch dragging - which should
|
| -// trigger dependent on the available drag distance.
|
| -TEST_F(CustomFrameViewAshTest,
|
| - MAYBE_TouchDragResizeCloseToCornerDiffersFromMouse) {
|
| - aura::Window* window = widget()->GetNativeWindow();
|
| - views::View* view = maximize_button();
|
| -
|
| - gfx::Rect work_area = widget()->GetWorkAreaBoundsInScreen();
|
| - gfx::Rect bounds = window->bounds();
|
| - bounds.set_x(work_area.width() - bounds.width());
|
| - widget()->SetBounds(bounds);
|
| -
|
| - gfx::Point start_point = view->GetBoundsInScreen().CenterPoint();
|
| - // We want to move all the way to the right (the few pixels we have).
|
| - gfx::Point end_point = gfx::Point(work_area.width(), start_point.y());
|
| -
|
| - aura::test::EventGenerator generator(window->GetRootWindow(), start_point);
|
| -
|
| - EXPECT_TRUE(ash::wm::IsWindowNormal(window));
|
| -
|
| - // Snap right with a touch drag.
|
| - generator.GestureScrollSequence(start_point,
|
| - end_point,
|
| - base::TimeDelta::FromMilliseconds(100),
|
| - 10);
|
| - RunAllPendingInMessageLoop();
|
| -
|
| - EXPECT_FALSE(ash::wm::IsWindowMaximized(window));
|
| - EXPECT_FALSE(ash::wm::IsWindowMinimized(window));
|
| - gfx::Rect touch_result = window->bounds();
|
| - EXPECT_NE(bounds.ToString(), touch_result.ToString());
|
| -
|
| - // Set the position back to where it was before and re-try with a mouse.
|
| - widget()->SetBounds(bounds);
|
| -
|
| - generator.MoveMouseTo(start_point);
|
| - generator.PressLeftButton();
|
| - generator.MoveMouseTo(end_point, 10);
|
| - generator.ReleaseLeftButton();
|
| - RunAllPendingInMessageLoop();
|
| -
|
| - EXPECT_FALSE(ash::wm::IsWindowMaximized(window));
|
| - EXPECT_FALSE(ash::wm::IsWindowMinimized(window));
|
| - gfx::Rect mouse_result = window->bounds();
|
| -
|
| - // The difference between the two operations should be that the mouse
|
| - // operation should have just started to resize and the touch operation is
|
| - // already all the way down to the smallest possible size.
|
| - EXPECT_NE(mouse_result.ToString(), touch_result.ToString());
|
| - EXPECT_GT(mouse_result.width(), touch_result.width());
|
| -}
|
| -
|
| // Test that closing the (browser) window with an opened balloon does not
|
| // crash the system. In other words: Make sure that shutting down the frame
|
| // destroys the opened balloon in an orderly fashion.
|
| @@ -475,8 +415,7 @@ TEST_F(CustomFrameViewAshTest, MaximizeLeftByButton) {
|
| EXPECT_FALSE(ash::wm::IsWindowMinimized(window));
|
| internal::SnapSizer sizer(window, button_pos,
|
| internal::SnapSizer::LEFT_EDGE,
|
| - internal::SnapSizer::OTHER_INPUT);
|
| - sizer.SelectDefaultSizeAndDisableResize();
|
| + internal::SnapSizer::STEP_NO);
|
| EXPECT_EQ(sizer.target_bounds().ToString(), window->bounds().ToString());
|
| }
|
|
|
|
|