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 "core/dom/Document.h" | 8 #include "core/dom/Document.h" |
8 #include "core/dom/Range.h" | 9 #include "core/dom/Range.h" |
9 #include "core/editing/Editor.h" | 10 #include "core/editing/Editor.h" |
10 #include "core/editing/FrameSelection.h" | 11 #include "core/editing/FrameSelection.h" |
11 #include "core/frame/FrameView.h" | 12 #include "core/frame/FrameView.h" |
12 #include "core/frame/LocalFrame.h" | 13 #include "core/frame/LocalFrame.h" |
13 #include "core/frame/Settings.h" | 14 #include "core/frame/Settings.h" |
14 #include "core/page/AutoscrollController.h" | 15 #include "core/page/AutoscrollController.h" |
15 #include "core/page/Page.h" | 16 #include "core/page/Page.h" |
16 #include "core/testing/DummyPageHolder.h" | 17 #include "core/testing/DummyPageHolder.h" |
17 #include "testing/gtest/include/gtest/gtest.h" | 18 #include "testing/gtest/include/gtest/gtest.h" |
18 #include <memory> | |
19 | 19 |
20 namespace blink { | 20 namespace blink { |
21 | 21 |
22 class EventHandlerTest : public ::testing::Test { | 22 class EventHandlerTest : public ::testing::Test { |
23 protected: | 23 protected: |
24 void SetUp() override; | 24 void SetUp() override; |
25 | 25 |
26 Page& page() const { return m_dummyPageHolder->page(); } | 26 Page& page() const { return m_dummyPageHolder->page(); } |
27 Document& document() const { return m_dummyPageHolder->document(); } | 27 Document& document() const { return m_dummyPageHolder->document(); } |
28 FrameSelection& selection() const { return document().frame()->selection(); } | 28 FrameSelection& selection() const { return document().frame()->selection(); } |
(...skipping 399 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
428 WebPointerProperties::Button::Left, 1, WebInputEvent::NoModifiers, | 428 WebPointerProperties::Button::Left, 1, WebInputEvent::NoModifiers, |
429 TimeTicks::Now().InSeconds()); | 429 TimeTicks::Now().InSeconds()); |
430 mouseUpEvent.setFrameScale(1); | 430 mouseUpEvent.setFrameScale(1); |
431 document().frame()->eventHandler().dragSourceEndedAt(mouseUpEvent, | 431 document().frame()->eventHandler().dragSourceEndedAt(mouseUpEvent, |
432 DragOperationNone); | 432 DragOperationNone); |
433 | 433 |
434 // This test passes if it doesn't crash. | 434 // This test passes if it doesn't crash. |
435 } | 435 } |
436 | 436 |
437 } // namespace blink | 437 } // namespace blink |
OLD | NEW |