| 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/workspace_event_handler.h" | 5 #include "ash/wm/workspace/workspace_event_handler.h" |
| 6 | 6 |
| 7 #include "ash/screen_util.h" | 7 #include "ash/screen_util.h" |
| 8 #include "ash/shell.h" | 8 #include "ash/shell.h" |
| 9 #include "ash/test/ash_test_base.h" | 9 #include "ash/test/ash_test_base.h" |
| 10 #include "ash/wm/window_state.h" | 10 #include "ash/wm/window_state.h" |
| (...skipping 18 matching lines...) Expand all Loading... |
| 29 #endif | 29 #endif |
| 30 | 30 |
| 31 namespace ash { | 31 namespace ash { |
| 32 | 32 |
| 33 namespace { | 33 namespace { |
| 34 | 34 |
| 35 // Clicks |button| with |flags|. | 35 // Clicks |button| with |flags|. |
| 36 void ClickButtonWithFlags(ui::test::EventGenerator* generator, | 36 void ClickButtonWithFlags(ui::test::EventGenerator* generator, |
| 37 int button, | 37 int button, |
| 38 int flags) { | 38 int flags) { |
| 39 gfx::Point location = generator->current_location(); | 39 auto location = gfx::PointF(generator->current_location()); |
| 40 ui::MouseEvent press(ui::ET_MOUSE_PRESSED, location, location, | 40 ui::MouseEvent press(ui::ET_MOUSE_PRESSED, location, location, |
| 41 ui::EventTimeForNow(), button | flags, button); | 41 ui::EventTimeForNow(), button | flags, button); |
| 42 generator->Dispatch(&press); | 42 generator->Dispatch(&press); |
| 43 ui::MouseEvent release(ui::ET_MOUSE_RELEASED, location, location, | 43 ui::MouseEvent release(ui::ET_MOUSE_RELEASED, location, location, |
| 44 ui::EventTimeForNow(), button | flags, button); | 44 ui::EventTimeForNow(), button | flags, button); |
| 45 generator->Dispatch(&release); | 45 generator->Dispatch(&release); |
| 46 } | 46 } |
| 47 | 47 |
| 48 } // namespace | 48 } // namespace |
| 49 | 49 |
| (...skipping 493 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 543 delegate.set_window_component(HTCAPTION); | 543 delegate.set_window_component(HTCAPTION); |
| 544 generator.PressRightButton(); | 544 generator.PressRightButton(); |
| 545 generator.ReleaseRightButton(); | 545 generator.ReleaseRightButton(); |
| 546 EXPECT_FALSE(window_state->IsMaximized()); | 546 EXPECT_FALSE(window_state->IsMaximized()); |
| 547 ClickButtonWithFlags(&generator, ui::EF_LEFT_MOUSE_BUTTON, | 547 ClickButtonWithFlags(&generator, ui::EF_LEFT_MOUSE_BUTTON, |
| 548 ui::EF_IS_DOUBLE_CLICK); | 548 ui::EF_IS_DOUBLE_CLICK); |
| 549 EXPECT_FALSE(window_state->IsMaximized()); | 549 EXPECT_FALSE(window_state->IsMaximized()); |
| 550 } | 550 } |
| 551 | 551 |
| 552 } // namespace ash | 552 } // namespace ash |
| OLD | NEW |