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

Unified Diff: ash/wm/toplevel_window_event_handler_unittest.cc

Issue 23471004: Only support left/right maximizing at 50% width when the --ash-enable-alternate-caption-button (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 4 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 side-by-side diff with in-line comments
Download patch
Index: ash/wm/toplevel_window_event_handler_unittest.cc
diff --git a/ash/wm/toplevel_window_event_handler_unittest.cc b/ash/wm/toplevel_window_event_handler_unittest.cc
index c84f8b3f122fceb1fbfb3738a84915d365a58616..c558f7bbafe6c611abb33465ec988edc934bcfab 100644
--- a/ash/wm/toplevel_window_event_handler_unittest.cc
+++ b/ash/wm/toplevel_window_event_handler_unittest.cc
@@ -14,7 +14,6 @@
#include "ash/wm/resize_shadow.h"
#include "ash/wm/resize_shadow_controller.h"
#include "ash/wm/window_util.h"
-#include "ash/wm/workspace/snap_sizer.h"
#include "ash/wm/workspace_controller.h"
#include "base/basictypes.h"
#include "base/compiler_specific.h"
@@ -390,10 +389,8 @@ TEST_F(ToplevelWindowEventHandlerTest, GestureDrag) {
// Snap right;
{
// Get the expected snapped bounds before snapping.
- internal::SnapSizer sizer(target.get(), location,
- internal::SnapSizer::RIGHT_EDGE,
- internal::SnapSizer::OTHER_INPUT);
- gfx::Rect snapped_bounds = sizer.GetSnapBounds(target->bounds());
+ gfx::Rect snapped_bounds = wm::GetSnappedWindowBoundsInParent(
+ target.get(), wm::SNAP_RIGHT_EDGE);
end.Offset(100, 0);
generator.GestureScrollSequence(location, end,
@@ -411,10 +408,8 @@ TEST_F(ToplevelWindowEventHandlerTest, GestureDrag) {
// Snap left.
{
// Get the expected snapped bounds before snapping.
- internal::SnapSizer sizer(target.get(), location,
- internal::SnapSizer::LEFT_EDGE,
- internal::SnapSizer::OTHER_INPUT);
- gfx::Rect snapped_bounds = sizer.GetSnapBounds(target->bounds());
+ gfx::Rect snapped_bounds = wm::GetSnappedWindowBoundsInParent(
+ target.get(), wm::SNAP_LEFT_EDGE);
end = location = target->GetBoundsInRootWindow().CenterPoint();
end.Offset(-100, 0);
generator.GestureScrollSequence(location, end,
@@ -530,10 +525,8 @@ TEST_F(ToplevelWindowEventHandlerTest, GestureDragForUnresizableWindow) {
// Try to snap right. The window is not resizable. So it should not snap.
{
// Get the expected snapped bounds before the gesture.
- internal::SnapSizer sizer(target.get(), location,
- internal::SnapSizer::RIGHT_EDGE,
- internal::SnapSizer::OTHER_INPUT);
- gfx::Rect snapped_bounds = sizer.GetSnapBounds(target->bounds());
+ gfx::Rect snapped_bounds = wm::GetSnappedWindowBoundsInParent(
+ target.get(), wm::SNAP_RIGHT_EDGE);
end.Offset(100, 0);
generator.GestureScrollSequence(location, end,
@@ -555,10 +548,8 @@ TEST_F(ToplevelWindowEventHandlerTest, GestureDragForUnresizableWindow) {
// Try to snap left. It should not snap.
{
// Get the expected snapped bounds before the gesture.
- internal::SnapSizer sizer(target.get(), location,
- internal::SnapSizer::LEFT_EDGE,
- internal::SnapSizer::OTHER_INPUT);
- gfx::Rect snapped_bounds = sizer.GetSnapBounds(target->bounds());
+ gfx::Rect snapped_bounds = wm::GetSnappedWindowBoundsInParent(
+ target.get(), wm::SNAP_LEFT_EDGE);
end = location = target->GetBoundsInRootWindow().CenterPoint();
end.Offset(-100, 0);
generator.GestureScrollSequence(location, end,

Powered by Google App Engine
This is Rietveld 408576698