OLD | NEW |
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/wm/workspace/multi_window_resize_controller.h" | 5 #include "ash/wm/workspace/multi_window_resize_controller.h" |
6 | 6 |
7 #include "ash/shell.h" | 7 #include "ash/shell.h" |
8 #include "ash/test/ash_test_base.h" | 8 #include "ash/test/ash_test_base.h" |
9 #include "ash/wm/window_util.h" | 9 #include "ash/wm/window_util.h" |
10 #include "ash/wm/workspace_controller.h" | 10 #include "ash/wm/workspace_controller.h" |
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
239 EXPECT_TRUE(IsShowing()); | 239 EXPECT_TRUE(IsShowing()); |
240 EXPECT_FALSE(HasPendingHide()); | 240 EXPECT_FALSE(HasPendingHide()); |
241 | 241 |
242 // w3 should be picked up when resize is started. | 242 // w3 should be picked up when resize is started. |
243 gfx::Rect bounds(resize_widget()->GetWindowBoundsInScreen()); | 243 gfx::Rect bounds(resize_widget()->GetWindowBoundsInScreen()); |
244 generator.MoveMouseTo(bounds.x() + 1, bounds.y() + 1); | 244 generator.MoveMouseTo(bounds.x() + 1, bounds.y() + 1); |
245 generator.PressLeftButton(); | 245 generator.PressLeftButton(); |
246 generator.MoveMouseTo(bounds.x() + 11, bounds.y() + 10); | 246 generator.MoveMouseTo(bounds.x() + 11, bounds.y() + 10); |
247 | 247 |
248 EXPECT_TRUE(HasTarget(w3.get())); | 248 EXPECT_TRUE(HasTarget(w3.get())); |
| 249 |
| 250 // Release the mouse. The resizer should still be visible and a subsequent |
| 251 // press should not trigger a DCHECK. |
| 252 generator.ReleaseLeftButton(); |
| 253 EXPECT_TRUE(IsShowing()); |
| 254 generator.PressLeftButton(); |
249 } | 255 } |
250 | |
251 } // namespace internal | 256 } // namespace internal |
252 } // namespace ash | 257 } // namespace ash |
OLD | NEW |