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

Unified Diff: ash/wm/workspace/workspace_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/window_state_unittest.cc ('k') | ash/wm/workspace/workspace_window_resizer_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/workspace/workspace_event_handler_unittest.cc
diff --git a/ash/wm/workspace/workspace_event_handler_unittest.cc b/ash/wm/workspace/workspace_event_handler_unittest.cc
index 9442fd8298b424f9be4f68686d1a5a63da4089d3..525ca393475bde21c670b5a63ba3ea72066618da 100644
--- a/ash/wm/workspace/workspace_event_handler_unittest.cc
+++ b/ash/wm/workspace/workspace_event_handler_unittest.cc
@@ -14,6 +14,7 @@
#include "ash/wm/window_util.h"
#include "ash/wm/workspace_controller_test_helper.h"
#include "base/threading/thread_task_runner_handle.h"
+#include "services/ui/public/interfaces/window_manager_constants.mojom.h"
#include "ui/aura/client/aura_constants.h"
#include "ui/aura/test/test_window_delegate.h"
#include "ui/aura/window.h"
@@ -303,7 +304,8 @@ TEST_F(WorkspaceEventHandlerTest,
CreateTestWindow(&delegate1, gfx::Rect(10, 20, 30, 40)));
std::unique_ptr<aura::Window> child(
CreateTestWindow(&delegate2, gfx::Rect(0, 0, 1, 1)));
- window->SetProperty(aura::client::kCanMaximizeKey, true);
+ window->SetProperty(aura::client::kResizeBehaviorKey,
+ ui::mojom::kResizeBehaviorCanMaximize);
delegate1.set_window_component(HTCAPTION);
child->SetProperty(aura::client::kModalKey, ui::MODAL_TYPE_WINDOW);
@@ -329,7 +331,8 @@ TEST_F(WorkspaceEventHandlerTest, DoubleClickCaptionTogglesMaximize) {
aura::test::TestWindowDelegate delegate;
std::unique_ptr<aura::Window> window(
CreateTestWindow(&delegate, gfx::Rect(1, 2, 30, 40)));
- window->SetProperty(aura::client::kCanMaximizeKey, true);
+ window->SetProperty(aura::client::kResizeBehaviorKey,
+ ui::mojom::kResizeBehaviorCanMaximize);
wm::WindowState* window_state = wm::GetWindowState(window.get());
gfx::Rect restore_bounds = window->bounds();
@@ -387,7 +390,8 @@ TEST_F(WorkspaceEventHandlerTest,
aura::test::TestWindowDelegate delegate;
std::unique_ptr<aura::Window> window(
CreateTestWindow(&delegate, gfx::Rect(1, 2, 30, 40)));
- window->SetProperty(aura::client::kCanMaximizeKey, true);
+ window->SetProperty(aura::client::kResizeBehaviorKey,
+ ui::mojom::kResizeBehaviorCanMaximize);
delegate.set_window_component(HTCAPTION);
aura::Window* root = Shell::GetPrimaryRootWindow();
ui::test::EventGenerator generator(root, window.get());
@@ -406,7 +410,8 @@ TEST_F(WorkspaceEventHandlerTest, DoubleTapCaptionTogglesMaximize) {
aura::test::TestWindowDelegate delegate;
gfx::Rect bounds(10, 20, 30, 40);
std::unique_ptr<aura::Window> window(CreateTestWindow(&delegate, bounds));
- window->SetProperty(aura::client::kCanMaximizeKey, true);
+ window->SetProperty(aura::client::kResizeBehaviorKey,
+ ui::mojom::kResizeBehaviorCanMaximize);
delegate.set_window_component(HTCAPTION);
wm::WindowState* window_state = wm::GetWindowState(window.get());
@@ -468,7 +473,8 @@ TEST_F(WorkspaceEventHandlerTest,
aura::test::TestWindowDelegate delegate;
std::unique_ptr<aura::Window> window(
CreateTestWindow(&delegate, gfx::Rect(1, 2, 30, 40)));
- window->SetProperty(aura::client::kCanMaximizeKey, true);
+ window->SetProperty(aura::client::kResizeBehaviorKey,
+ ui::mojom::kResizeBehaviorCanMaximize);
wm::WindowState* window_state = wm::GetWindowState(window.get());
EXPECT_FALSE(window_state->IsMaximized());
@@ -493,7 +499,8 @@ TEST_F(WorkspaceEventHandlerTest, DoubleTapTwoDifferentTargetsDoesntMaximize) {
aura::test::TestWindowDelegate delegate;
std::unique_ptr<aura::Window> window(
CreateTestWindow(&delegate, gfx::Rect(1, 2, 30, 40)));
- window->SetProperty(aura::client::kCanMaximizeKey, true);
+ window->SetProperty(aura::client::kResizeBehaviorKey,
+ ui::mojom::kResizeBehaviorCanMaximize);
wm::WindowState* window_state = wm::GetWindowState(window.get());
EXPECT_FALSE(window_state->IsMaximized());
@@ -515,7 +522,8 @@ TEST_F(WorkspaceEventHandlerTest, RightClickDuringDoubleClickDoesntMaximize) {
aura::test::TestWindowDelegate delegate;
std::unique_ptr<aura::Window> window(
CreateTestWindow(&delegate, gfx::Rect(1, 2, 30, 40)));
- window->SetProperty(aura::client::kCanMaximizeKey, true);
+ window->SetProperty(aura::client::kResizeBehaviorKey,
+ ui::mojom::kResizeBehaviorCanMaximize);
wm::WindowState* window_state = wm::GetWindowState(window.get());
EXPECT_FALSE(window_state->IsMaximized());
« no previous file with comments | « ash/wm/window_state_unittest.cc ('k') | ash/wm/workspace/workspace_window_resizer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698