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

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

Issue 2016073004: Show a visual indicator for the progress of auto-click. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@lkgr
Patch Set: Rebase. Created 4 years, 6 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
« 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/test_window_delegate.h" 8 #include "ui/aura/test/test_window_delegate.h"
9 #include "ui/aura/window.h" 9 #include "ui/aura/window.h"
10 #include "ui/aura/window_event_dispatcher.h" 10 #include "ui/aura/window_event_dispatcher.h"
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 }; 59 };
60 60
61 class AutoclickTest : public test::AshTestBase { 61 class AutoclickTest : public test::AshTestBase {
62 public: 62 public:
63 AutoclickTest() {} 63 AutoclickTest() {}
64 ~AutoclickTest() override {} 64 ~AutoclickTest() override {}
65 65
66 void SetUp() override { 66 void SetUp() override {
67 test::AshTestBase::SetUp(); 67 test::AshTestBase::SetUp();
68 Shell::GetInstance()->AddPreTargetHandler(&mouse_event_capturer_); 68 Shell::GetInstance()->AddPreTargetHandler(&mouse_event_capturer_);
69 GetAutoclickController()->SetAutoclickDelay(0); 69 GetAutoclickController()->SetAutoclickDelay(base::TimeDelta());
70 70
71 // Move mouse to deterministic location at the start of each test. 71 // Move mouse to deterministic location at the start of each test.
72 GetEventGenerator().MoveMouseTo(100, 100); 72 GetEventGenerator().MoveMouseTo(100, 100);
73 } 73 }
74 74
75 void TearDown() override { 75 void TearDown() override {
76 Shell::GetInstance()->RemovePreTargetHandler(&mouse_event_capturer_); 76 Shell::GetInstance()->RemovePreTargetHandler(&mouse_event_capturer_);
77 test::AshTestBase::TearDown(); 77 test::AshTestBase::TearDown();
78 } 78 }
79 79
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after
282 aura::test::EventCountDelegate delegate; 282 aura::test::EventCountDelegate delegate;
283 std::unique_ptr<aura::Window> window(CreateTestWindowInShellWithDelegate( 283 std::unique_ptr<aura::Window> window(CreateTestWindowInShellWithDelegate(
284 &delegate, 123, gfx::Rect(50, 50, 100, 100))); 284 &delegate, 123, gfx::Rect(50, 50, 100, 100)));
285 window->Show(); 285 window->Show();
286 events = WaitForMouseEvents(); 286 events = WaitForMouseEvents();
287 EXPECT_EQ(0u, events.size()); 287 EXPECT_EQ(0u, events.size());
288 EXPECT_EQ("1 1 0", delegate.GetMouseMotionCountsAndReset()); 288 EXPECT_EQ("1 1 0", delegate.GetMouseMotionCountsAndReset());
289 } 289 }
290 290
291 } // namespace ash 291 } // 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