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

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

Issue 623293003: replace OVERRIDE and FINAL with override and final in chrome/browser/chromeos/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: run git cl format on echo_dialog_view.h Created 6 years, 2 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 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 16 matching lines...) Expand all
27 27
28 class TouchExplorationTest : public InProcessBrowserTest { 28 class TouchExplorationTest : public InProcessBrowserTest {
29 public: 29 public:
30 TouchExplorationTest() : simulated_clock_(new base::SimpleTestTickClock()) { 30 TouchExplorationTest() : simulated_clock_(new base::SimpleTestTickClock()) {
31 // Tests fail if time is ever 0. 31 // Tests fail if time is ever 0.
32 simulated_clock_->Advance(base::TimeDelta::FromMilliseconds(10)); 32 simulated_clock_->Advance(base::TimeDelta::FromMilliseconds(10));
33 } 33 }
34 virtual ~TouchExplorationTest() {} 34 virtual ~TouchExplorationTest() {}
35 35
36 protected: 36 protected:
37 virtual void SetUpOnMainThread() OVERRIDE { 37 virtual void SetUpOnMainThread() override {
38 // The RenderView for WebContents is created as a result of the 38 // The RenderView for WebContents is created as a result of the
39 // navigation to the New Tab page which is done as part of the test 39 // navigation to the New Tab page which is done as part of the test
40 // SetUp. The creation involves sending a resize message to the renderer 40 // SetUp. The creation involves sending a resize message to the renderer
41 // process. Here we wait for the resize ack to be received, because 41 // process. Here we wait for the resize ack to be received, because
42 // currently WindowEventDispatcher has code to hold touch and mouse 42 // currently WindowEventDispatcher has code to hold touch and mouse
43 // move events until resize is complete (crbug.com/384342) which 43 // move events until resize is complete (crbug.com/384342) which
44 // interferes with this test. 44 // interferes with this test.
45 content::WebContents* web_contents = 45 content::WebContents* web_contents =
46 browser()->tab_strip_model()->GetActiveWebContents(); 46 browser()->tab_strip_model()->GetActiveWebContents();
47 content::WaitForResizeComplete(web_contents); 47 content::WaitForResizeComplete(web_contents);
48 root_window_ = ash::Shell::GetInstance()->GetPrimaryRootWindow(); 48 root_window_ = ash::Shell::GetInstance()->GetPrimaryRootWindow();
49 event_handler_.reset(new ui::test::TestEventHandler()); 49 event_handler_.reset(new ui::test::TestEventHandler());
50 root_window_->AddPreTargetHandler(event_handler_.get()); 50 root_window_->AddPreTargetHandler(event_handler_.get());
51 } 51 }
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(ash::A11Y_NOTIFICATION_NONE);
63 } 63 }
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after
235 235
236 // Continuing to move the touch exploration finger should send more mouse 236 // Continuing to move the touch exploration finger should send more mouse
237 // events. 237 // events.
238 generator.MoveTouchId(gfx::Point(509, 609), 1); 238 generator.MoveTouchId(gfx::Point(509, 609), 1);
239 EXPECT_EQ(0, event_handler_->num_touch_events()); 239 EXPECT_EQ(0, event_handler_->num_touch_events());
240 EXPECT_TRUE(cursor_client->IsMouseEventsEnabled()); 240 EXPECT_TRUE(cursor_client->IsMouseEventsEnabled());
241 EXPECT_FALSE(cursor_client->IsCursorVisible()); 241 EXPECT_FALSE(cursor_client->IsCursorVisible());
242 } 242 }
243 243
244 } // namespace ui 244 } // namespace ui
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698