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

Side by Side Diff: ash/wm/workspace/multi_window_resize_controller_unittest.cc

Issue 2629643002: chromeos: Renames WmWindowAura to WmWindow (Closed)
Patch Set: feedback Created 3 years, 11 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 unified diff | Download patch
« no previous file with comments | « ash/wm/window_util_unittest.cc ('k') | ash/wm/workspace/workspace_event_handler_aura.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ash/common/wm/workspace/multi_window_resize_controller.h" 5 #include "ash/common/wm/workspace/multi_window_resize_controller.h"
6 6
7 #include "ash/aura/wm_window_aura.h"
8 #include "ash/common/ash_constants.h" 7 #include "ash/common/ash_constants.h"
9 #include "ash/common/frame/custom_frame_view_ash.h" 8 #include "ash/common/frame/custom_frame_view_ash.h"
10 #include "ash/common/test/workspace_event_handler_test_helper.h" 9 #include "ash/common/test/workspace_event_handler_test_helper.h"
11 #include "ash/common/wm/workspace_controller.h" 10 #include "ash/common/wm/workspace_controller.h"
11 #include "ash/common/wm_window.h"
12 #include "ash/shell.h" 12 #include "ash/shell.h"
13 #include "ash/test/ash_test_base.h" 13 #include "ash/test/ash_test_base.h"
14 #include "ash/test/shell_test_api.h" 14 #include "ash/test/shell_test_api.h"
15 #include "ash/wm/window_util.h" 15 #include "ash/wm/window_util.h"
16 #include "ash/wm/workspace_controller_test_helper.h" 16 #include "ash/wm/workspace_controller_test_helper.h"
17 #include "base/stl_util.h" 17 #include "base/stl_util.h"
18 #include "ui/aura/test/test_window_delegate.h" 18 #include "ui/aura/test/test_window_delegate.h"
19 #include "ui/aura/window.h" 19 #include "ui/aura/window.h"
20 #include "ui/base/hit_test.h" 20 #include "ui/base/hit_test.h"
21 #include "ui/events/test/event_generator.h" 21 #include "ui/events/test/event_generator.h"
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 78
79 bool IsShowing() { return resize_controller_->IsShowing(); } 79 bool IsShowing() { return resize_controller_->IsShowing(); }
80 80
81 bool HasPendingShow() { return resize_controller_->show_timer_.IsRunning(); } 81 bool HasPendingShow() { return resize_controller_->show_timer_.IsRunning(); }
82 82
83 void Hide() { resize_controller_->Hide(); } 83 void Hide() { resize_controller_->Hide(); }
84 84
85 bool HasTarget(aura::Window* window) { 85 bool HasTarget(aura::Window* window) {
86 if (!resize_controller_->windows_.is_valid()) 86 if (!resize_controller_->windows_.is_valid())
87 return false; 87 return false;
88 WmWindow* wm_window = WmWindowAura::Get(window); 88 WmWindow* wm_window = WmWindow::Get(window);
89 if ((resize_controller_->windows_.window1 == wm_window || 89 if ((resize_controller_->windows_.window1 == wm_window ||
90 resize_controller_->windows_.window2 == wm_window)) 90 resize_controller_->windows_.window2 == wm_window))
91 return true; 91 return true;
92 return base::ContainsValue(resize_controller_->windows_.other_windows, 92 return base::ContainsValue(resize_controller_->windows_.other_windows,
93 wm_window); 93 wm_window);
94 } 94 }
95 95
96 bool IsOverWindows(const gfx::Point& loc) { 96 bool IsOverWindows(const gfx::Point& loc) {
97 return resize_controller_->IsOverWindows(loc); 97 return resize_controller_->IsOverWindows(loc);
98 } 98 }
(...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after
355 355
356 // Clicking outside the resize handle should immediately hide the resize 356 // Clicking outside the resize handle should immediately hide the resize
357 // handle. 357 // handle.
358 EXPECT_FALSE(resize_widget_bounds_in_screen.Contains(w1_center_in_screen)); 358 EXPECT_FALSE(resize_widget_bounds_in_screen.Contains(w1_center_in_screen));
359 generator.MoveMouseTo(w1_center_in_screen); 359 generator.MoveMouseTo(w1_center_in_screen);
360 generator.ClickLeftButton(); 360 generator.ClickLeftButton();
361 EXPECT_FALSE(IsShowing()); 361 EXPECT_FALSE(IsShowing());
362 } 362 }
363 363
364 } // namespace ash 364 } // namespace ash
OLDNEW
« no previous file with comments | « ash/wm/window_util_unittest.cc ('k') | ash/wm/workspace/workspace_event_handler_aura.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698