Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 Loading... | |
| 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::TiemDelta()); |
|
jdufault
2016/06/09 16:41:26
It looks like this is misspelled. You can compile
sammiequon
2016/06/10 19:30:26
Done.
| |
| 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 Loading... | |
| 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 |
| OLD | NEW |