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

Side by Side Diff: ash/autoclick/autoclick_unittest.cc

Issue 27196006: Add autoclick to settings page under the accessibility section. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix unit test Created 7 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 | Annotate | Revision Log
« no previous file with comments | « ash/autoclick/autoclick_controller.cc ('k') | chrome/app/chromeos_strings.grdp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/autoclick/autoclick_controller.h" 5 #include "ash/autoclick/autoclick_controller.h"
6 #include "ash/shell.h" 6 #include "ash/shell.h"
7 #include "ash/test/ash_test_base.h" 7 #include "ash/test/ash_test_base.h"
8 #include "ui/aura/test/event_generator.h" 8 #include "ui/aura/test/event_generator.h"
9 #include "ui/aura/window.h" 9 #include "ui/aura/window.h"
10 #include "ui/events/event.h" 10 #include "ui/events/event.h"
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 }; 56 };
57 57
58 class AutoclickTest : public test::AshTestBase { 58 class AutoclickTest : public test::AshTestBase {
59 public: 59 public:
60 AutoclickTest() {} 60 AutoclickTest() {}
61 virtual ~AutoclickTest() {} 61 virtual ~AutoclickTest() {}
62 62
63 virtual void SetUp() OVERRIDE { 63 virtual void SetUp() OVERRIDE {
64 test::AshTestBase::SetUp(); 64 test::AshTestBase::SetUp();
65 Shell::GetInstance()->AddPreTargetHandler(&mouse_event_capturer_); 65 Shell::GetInstance()->AddPreTargetHandler(&mouse_event_capturer_);
66 GetAutoclickController()->SetClickWaitTime(0); 66 GetAutoclickController()->SetAutoclickDelay(0);
67 67
68 // Move mouse to deterministic location at the start of each test. 68 // Move mouse to deterministic location at the start of each test.
69 GetEventGenerator().MoveMouseTo(10, 10); 69 GetEventGenerator().MoveMouseTo(10, 10);
70 } 70 }
71 71
72 virtual void TearDown() OVERRIDE { 72 virtual void TearDown() OVERRIDE {
73 Shell::GetInstance()->RemovePreTargetHandler(&mouse_event_capturer_); 73 Shell::GetInstance()->RemovePreTargetHandler(&mouse_event_capturer_);
74 test::AshTestBase::TearDown(); 74 test::AshTestBase::TearDown();
75 } 75 }
76 76
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
232 // Test second root window. 232 // Test second root window.
233 aura::test::EventGenerator generator2(root_windows[1]); 233 aura::test::EventGenerator generator2(root_windows[1]);
234 generator2.MoveMouseTo(300, 400); 234 generator2.MoveMouseTo(300, 400);
235 events = WaitForMouseEvents(); 235 events = WaitForMouseEvents();
236 EXPECT_EQ(2u, events.size()); 236 EXPECT_EQ(2u, events.size());
237 EXPECT_EQ(300, events[0].root_location().x()); 237 EXPECT_EQ(300, events[0].root_location().x());
238 EXPECT_EQ(400, events[0].root_location().y()); 238 EXPECT_EQ(400, events[0].root_location().y());
239 } 239 }
240 240
241 } // namespace ash 241 } // namespace ash
OLDNEW
« no previous file with comments | « ash/autoclick/autoclick_controller.cc ('k') | chrome/app/chromeos_strings.grdp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698