OLD | NEW |
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 <vector> | 5 #include <vector> |
6 | 6 |
7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
9 #include "base/message_loop/message_loop.h" | 9 #include "base/message_loop/message_loop.h" |
10 #include "base/time/time.h" | 10 #include "base/time/time.h" |
(...skipping 534 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
545 | 545 |
546 MouseDown(100, 200); | 546 MouseDown(100, 200); |
547 EXPECT_EQ("TouchStart GestureTapDown", ExpectedEvents()); | 547 EXPECT_EQ("TouchStart GestureTapDown", ExpectedEvents()); |
548 MouseUp(200, 200); | 548 MouseUp(200, 200); |
549 EXPECT_EQ( | 549 EXPECT_EQ( |
550 "TouchMove GestureTapCancel GestureScrollBegin GestureScrollUpdate" | 550 "TouchMove GestureTapCancel GestureScrollBegin GestureScrollUpdate" |
551 " TouchEnd GestureScrollEnd", | 551 " TouchEnd GestureScrollEnd", |
552 ExpectedEvents()); | 552 ExpectedEvents()); |
553 } | 553 } |
554 | 554 |
| 555 TEST_F(TouchEmulatorTest, CancelAfterDisableDoesNotCrash) { |
| 556 DisableSynchronousTouchAck(); |
| 557 MouseDown(100, 200); |
| 558 emulator()->Disable(); |
| 559 EXPECT_EQ("TouchStart TouchCancel", ExpectedEvents()); |
| 560 emulator()->CancelTouch(); |
| 561 } |
| 562 |
555 } // namespace content | 563 } // namespace content |
OLD | NEW |