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

Side by Side Diff: chrome/browser/chromeos/accessibility/touch_exploration_controller_browsertest.cc

Issue 682943002: Make chrome/browser/chromeos/accessibility compile on Athena with use_ash=0 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@athena_do_not_use_ash41_scroll_end_effect
Patch Set: Created 6 years, 1 month 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
OLDNEW
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 "ash/accessibility_delegate.h" 7 #include "ash/accessibility_delegate.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 "base/test/simple_test_tick_clock.h" 10 #include "base/test/simple_test_tick_clock.h"
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 52
53 virtual void TearDownOnMainThread() override { 53 virtual void TearDownOnMainThread() override {
54 SwitchTouchExplorationMode(false); 54 SwitchTouchExplorationMode(false);
55 root_window_->RemovePreTargetHandler(event_handler_.get()); 55 root_window_->RemovePreTargetHandler(event_handler_.get());
56 } 56 }
57 57
58 void SwitchTouchExplorationMode(bool on) { 58 void SwitchTouchExplorationMode(bool on) {
59 ash::AccessibilityDelegate* ad = 59 ash::AccessibilityDelegate* ad =
60 ash::Shell::GetInstance()->accessibility_delegate(); 60 ash::Shell::GetInstance()->accessibility_delegate();
61 if (on != ad->IsSpokenFeedbackEnabled()) 61 if (on != ad->IsSpokenFeedbackEnabled())
62 ad->ToggleSpokenFeedback(ash::A11Y_NOTIFICATION_NONE); 62 ad->ToggleSpokenFeedback(ui::A11Y_NOTIFICATION_NONE);
63 } 63 }
64 64
65 base::TimeDelta Now() { 65 base::TimeDelta Now() {
66 return base::TimeDelta::FromInternalValue( 66 return base::TimeDelta::FromInternalValue(
67 simulated_clock_->NowTicks().ToInternalValue()); 67 simulated_clock_->NowTicks().ToInternalValue());
68 } 68 }
69 69
70 ui::GestureDetector::Config gesture_detector_config_; 70 ui::GestureDetector::Config gesture_detector_config_;
71 base::SimpleTestTickClock* simulated_clock_; 71 base::SimpleTestTickClock* simulated_clock_;
72 aura::Window* root_window_; 72 aura::Window* root_window_;
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
242 242
243 // Continuing to move the touch exploration finger should send more mouse 243 // Continuing to move the touch exploration finger should send more mouse
244 // events. 244 // events.
245 generator.MoveTouchId(gfx::Point(509, 609), 1); 245 generator.MoveTouchId(gfx::Point(509, 609), 1);
246 EXPECT_EQ(0, event_handler_->num_touch_events()); 246 EXPECT_EQ(0, event_handler_->num_touch_events());
247 EXPECT_TRUE(cursor_client->IsMouseEventsEnabled()); 247 EXPECT_TRUE(cursor_client->IsMouseEventsEnabled());
248 EXPECT_FALSE(cursor_client->IsCursorVisible()); 248 EXPECT_FALSE(cursor_client->IsCursorVisible());
249 } 249 }
250 250
251 } // namespace ui 251 } // namespace ui
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698