OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "ui/chromeos/touch_exploration_controller.h" | 5 #include "ui/chromeos/touch_exploration_controller.h" |
6 | 6 |
7 #include "base/test/simple_test_tick_clock.h" | 7 #include "base/test/simple_test_tick_clock.h" |
8 #include "base/time/time.h" | 8 #include "base/time/time.h" |
9 #include "ui/aura/client/cursor_client.h" | 9 #include "ui/aura/client/cursor_client.h" |
10 #include "ui/aura/test/aura_test_base.h" | 10 #include "ui/aura/test/aura_test_base.h" |
(...skipping 451 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
462 #define CONFIRM_EVENTS_ARE_TOUCH_AND_EQUAL(e1, e2) \ | 462 #define CONFIRM_EVENTS_ARE_TOUCH_AND_EQUAL(e1, e2) \ |
463 ASSERT_NO_FATAL_FAILURE(ConfirmEventsAreTouchAndEqual(e1, e2)) | 463 ASSERT_NO_FATAL_FAILURE(ConfirmEventsAreTouchAndEqual(e1, e2)) |
464 | 464 |
465 #define CONFIRM_EVENTS_ARE_MOUSE_AND_EQUAL(e1, e2) \ | 465 #define CONFIRM_EVENTS_ARE_MOUSE_AND_EQUAL(e1, e2) \ |
466 ASSERT_NO_FATAL_FAILURE(ConfirmEventsAreMouseAndEqual(e1, e2)) | 466 ASSERT_NO_FATAL_FAILURE(ConfirmEventsAreMouseAndEqual(e1, e2)) |
467 | 467 |
468 #define CONFIRM_EVENTS_ARE_KEY_AND_EQUAL(e1, e2) \ | 468 #define CONFIRM_EVENTS_ARE_KEY_AND_EQUAL(e1, e2) \ |
469 ASSERT_NO_FATAL_FAILURE(ConfirmEventsAreKeyAndEqual(e1, e2)) | 469 ASSERT_NO_FATAL_FAILURE(ConfirmEventsAreKeyAndEqual(e1, e2)) |
470 | 470 |
471 // TODO(mfomitchev): Need to investigate why we don't get mouse enter/exit | 471 // TODO(mfomitchev): Need to investigate why we don't get mouse enter/exit |
472 // events when running these tests as part of ui_unittests. We do get them when | 472 // events when running these tests as part of ui_base_unittests. We do get them |
473 // the tests are run as part of ash unit tests. | 473 // when the tests are run as part of ash unit tests. |
474 | 474 |
475 // If a swipe has been successfully completed, then six key events will be | 475 // If a swipe has been successfully completed, then six key events will be |
476 // dispatched that correspond to shift+search+direction | 476 // dispatched that correspond to shift+search+direction |
477 void AssertDirectionalNavigationEvents(const ScopedVector<ui::Event>& events, | 477 void AssertDirectionalNavigationEvents(const ScopedVector<ui::Event>& events, |
478 ui::KeyboardCode direction) { | 478 ui::KeyboardCode direction) { |
479 ASSERT_EQ(6U, events.size()); | 479 ASSERT_EQ(6U, events.size()); |
480 ui::KeyEvent shift_pressed( | 480 ui::KeyEvent shift_pressed( |
481 ui::ET_KEY_PRESSED, ui::VKEY_SHIFT, ui::EF_SHIFT_DOWN); | 481 ui::ET_KEY_PRESSED, ui::VKEY_SHIFT, ui::EF_SHIFT_DOWN); |
482 ui::KeyEvent search_pressed( | 482 ui::KeyEvent search_pressed( |
483 ui::ET_KEY_PRESSED, ui::VKEY_LWIN, ui::EF_SHIFT_DOWN); | 483 ui::ET_KEY_PRESSED, ui::VKEY_LWIN, ui::EF_SHIFT_DOWN); |
(...skipping 1460 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1944 generator_->PressTouch(); | 1944 generator_->PressTouch(); |
1945 generator_->MoveTouch(initial_press); | 1945 generator_->MoveTouch(initial_press); |
1946 generator_->MoveTouch(*point); | 1946 generator_->MoveTouch(*point); |
1947 generator_->ReleaseTouch(); | 1947 generator_->ReleaseTouch(); |
1948 ASSERT_EQ(1U, delegate_.NumExitScreenSounds()); | 1948 ASSERT_EQ(1U, delegate_.NumExitScreenSounds()); |
1949 delegate_.ResetCountersToZero(); | 1949 delegate_.ResetCountersToZero(); |
1950 } | 1950 } |
1951 } | 1951 } |
1952 | 1952 |
1953 } // namespace ui | 1953 } // namespace ui |
OLD | NEW |