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

Unified Diff: ash/wm/toplevel_window_event_handler_unittest.cc

Issue 2542493002: Replace kCanMaximize/Minimize/Resize with kResizeBehavior. (Closed)
Patch Set: Fix int->bool compile issue. Created 4 years 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
« no previous file with comments | « ash/wm/maximize_mode/maximize_mode_window_manager_unittest.cc ('k') | ash/wm/window_state_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 b7c26120d6ecc16f5d91f17c475087f30f1ee2a9..06610b65e935a1e1a00a510ba159ab0b70ed2420 100644
--- a/ash/wm/toplevel_window_event_handler_unittest.cc
+++ b/ash/wm/toplevel_window_event_handler_unittest.cc
@@ -16,6 +16,7 @@
#include "ash/wm/window_util.h"
#include "base/compiler_specific.h"
#include "base/threading/thread_task_runner_handle.h"
+#include "services/ui/public/interfaces/window_manager_constants.mojom.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "ui/aura/client/aura_constants.h"
#include "ui/aura/client/capture_client.h"
@@ -433,7 +434,10 @@ TEST_F(ToplevelWindowEventHandlerTest, GestureDrag) {
target.get());
gfx::Rect old_bounds = target->bounds();
gfx::Point location(5, 5);
- target->SetProperty(aura::client::kCanMaximizeKey, true);
+ target->SetProperty(aura::client::kResizeBehaviorKey,
+ ui::mojom::kResizeBehaviorCanResize |
+ ui::mojom::kResizeBehaviorCanMaximize |
+ ui::mojom::kResizeBehaviorCanMinimize);
gfx::Point end = location;
@@ -499,8 +503,8 @@ TEST_F(ToplevelWindowEventHandlerTest,
ui::test::EventGenerator generator(Shell::GetPrimaryRootWindow(),
target.get());
gfx::Point location(5, 5);
- target->SetProperty(aura::client::kCanMaximizeKey, true);
- target->SetProperty(aura::client::kCanMinimizeKey, false);
+ target->SetProperty(aura::client::kResizeBehaviorKey,
+ ui::mojom::kResizeBehaviorCanMaximize);
gfx::Point end = location;
end.Offset(0, 100);
@@ -543,7 +547,8 @@ TEST_F(ToplevelWindowEventHandlerTest, GestureDragForUnresizableWindow) {
gfx::Rect old_bounds = target->bounds();
gfx::Point location(5, 5);
- target->SetProperty(aura::client::kCanResizeKey, false);
+ target->SetProperty(aura::client::kResizeBehaviorKey,
+ ui::mojom::kResizeBehaviorNone);
gfx::Point end = location;
@@ -589,7 +594,6 @@ TEST_F(ToplevelWindowEventHandlerTest, GestureDragMultipleWindows) {
ui::test::EventGenerator generator(Shell::GetPrimaryRootWindow(),
target.get());
gfx::Point location(5, 5);
- target->SetProperty(aura::client::kCanMaximizeKey, true);
// Send some touch events to start dragging |target|.
generator.MoveTouch(location);
« no previous file with comments | « ash/wm/maximize_mode/maximize_mode_window_manager_unittest.cc ('k') | ash/wm/window_state_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698