OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "core/input/EventHandler.h" | 5 #include "core/input/EventHandler.h" |
6 | 6 |
7 #include <memory> | 7 #include <memory> |
8 #include "core/dom/Document.h" | 8 #include "core/dom/Document.h" |
9 #include "core/dom/Range.h" | 9 #include "core/dom/Range.h" |
10 #include "core/editing/Editor.h" | 10 #include "core/editing/Editor.h" |
(...skipping 462 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
473 SetHtmlInnerHTML("<textarea cols=50 rows=50>Mispellinggg</textarea>"); | 473 SetHtmlInnerHTML("<textarea cols=50 rows=50>Mispellinggg</textarea>"); |
474 | 474 |
475 TapEventBuilder single_tap_event(IntPoint(10, 10), 1); | 475 TapEventBuilder single_tap_event(IntPoint(10, 10), 1); |
476 GetDocument().GetFrame()->GetEventHandler().HandleGestureEvent( | 476 GetDocument().GetFrame()->GetEventHandler().HandleGestureEvent( |
477 single_tap_event); | 477 single_tap_event); |
478 | 478 |
479 ASSERT_TRUE( | 479 ASSERT_TRUE( |
480 Selection().ComputeVisibleSelectionInDOMTreeDeprecated().IsCaret()); | 480 Selection().ComputeVisibleSelectionInDOMTreeDeprecated().IsCaret()); |
481 ASSERT_TRUE(Selection().IsHandleVisible()); | 481 ASSERT_TRUE(Selection().IsHandleVisible()); |
482 | 482 |
483 GetDocument().GetFrame()->GetEventHandler().SendContextMenuEventForKey( | 483 GetDocument().GetFrame()->GetEventHandler().ShowNonLocatedContextMenu( |
484 nullptr, kMenuSourceTouchHandle); | 484 nullptr, kMenuSourceTouchHandle); |
485 | 485 |
486 ASSERT_TRUE( | 486 ASSERT_TRUE( |
487 Selection().ComputeVisibleSelectionInDOMTreeDeprecated().IsCaret()); | 487 Selection().ComputeVisibleSelectionInDOMTreeDeprecated().IsCaret()); |
488 ASSERT_TRUE(Selection().IsHandleVisible()); | 488 ASSERT_TRUE(Selection().IsHandleVisible()); |
489 } | 489 } |
490 | 490 |
491 TEST_F(EventHandlerTest, dragEndInNewDrag) { | 491 TEST_F(EventHandlerTest, dragEndInNewDrag) { |
492 SetHtmlInnerHTML( | 492 SetHtmlInnerHTML( |
493 "<style>.box { width: 100px; height: 100px; display: block; }</style>" | 493 "<style>.box { width: 100px; height: 100px; display: block; }</style>" |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
580 WebPointerProperties::Button::kNoButton, 0, WebInputEvent::kNoModifiers, | 580 WebPointerProperties::Button::kNoButton, 0, WebInputEvent::kNoModifiers, |
581 TimeTicks::Now().InSeconds()); | 581 TimeTicks::Now().InSeconds()); |
582 mouse_leave_event.SetFrameScale(1); | 582 mouse_leave_event.SetFrameScale(1); |
583 GetDocument().GetFrame()->GetEventHandler().HandleMouseLeaveEvent( | 583 GetDocument().GetFrame()->GetEventHandler().HandleMouseLeaveEvent( |
584 mouse_leave_event); | 584 mouse_leave_event); |
585 | 585 |
586 EXPECT_EQ(WTF::String(), LastToolTip()); | 586 EXPECT_EQ(WTF::String(), LastToolTip()); |
587 } | 587 } |
588 | 588 |
589 } // namespace blink | 589 } // namespace blink |
OLD | NEW |