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

Unified Diff: ui/chromeos/touch_exploration_controller.cc

Issue 404473006: Revert of Added wrapper test class for touch_exploration_controller. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/chromeos/touch_exploration_controller.h ('k') | ui/chromeos/touch_exploration_controller_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/chromeos/touch_exploration_controller.cc
diff --git a/ui/chromeos/touch_exploration_controller.cc b/ui/chromeos/touch_exploration_controller.cc
index 1a3b8fad4447ffd8eab56e8e7c1be57745109896..287e59fd6d39626498b31342d6cde3915ff92020 100644
--- a/ui/chromeos/touch_exploration_controller.cc
+++ b/ui/chromeos/touch_exploration_controller.cc
@@ -35,8 +35,39 @@
root_window->GetHost()->GetEventSource()->AddEventRewriter(this);
}
+
TouchExplorationController::~TouchExplorationController() {
root_window_->GetHost()->GetEventSource()->RemoveEventRewriter(this);
+}
+
+void TouchExplorationController::CallTapTimerNowForTesting() {
+ DCHECK(tap_timer_.IsRunning());
+ tap_timer_.Stop();
+ OnTapTimerFired();
+}
+
+void TouchExplorationController::CallTapTimerNowIfRunningForTesting() {
+ if (tap_timer_.IsRunning()) {
+ tap_timer_.Stop();
+ OnTapTimerFired();
+ }
+}
+
+void TouchExplorationController::SetEventHandlerForTesting(
+ ui::EventHandler* event_handler_for_testing) {
+ event_handler_for_testing_ = event_handler_for_testing;
+}
+
+bool TouchExplorationController::IsInNoFingersDownStateForTesting() const {
+ return state_ == NO_FINGERS_DOWN;
+}
+
+bool TouchExplorationController::IsInGestureInProgressStateForTesting() const {
+ return state_ == GESTURE_IN_PROGRESS;
+}
+
+void TouchExplorationController::SuppressVLOGsForTesting(bool suppress) {
+ VLOG_on_ = !suppress;
}
ui::EventRewriteStatus TouchExplorationController::RewriteEvent(
« no previous file with comments | « ui/chromeos/touch_exploration_controller.h ('k') | ui/chromeos/touch_exploration_controller_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698