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 "config.h" | 5 #include "config.h" |
6 #include "core/input/EventHandler.h" | 6 #include "core/input/EventHandler.h" |
7 | 7 |
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/FrameSelection.h" | 10 #include "core/editing/FrameSelection.h" |
11 #include "core/frame/FrameView.h" | 11 #include "core/frame/FrameView.h" |
12 #include "core/frame/LocalFrame.h" | 12 #include "core/frame/LocalFrame.h" |
13 #include "core/html/HTMLDocument.h" | 13 #include "core/html/HTMLDocument.h" |
14 #include "core/page/AutoscrollController.h" | 14 #include "core/page/AutoscrollController.h" |
15 #include "core/page/Page.h" | 15 #include "core/page/Page.h" |
16 #include "core/testing/CoreTestHelpers.h" | |
17 #include "core/testing/DummyPageHolder.h" | 16 #include "core/testing/DummyPageHolder.h" |
18 #include "platform/PlatformMouseEvent.h" | 17 #include "platform/PlatformMouseEvent.h" |
19 #include <gtest/gtest.h> | 18 #include <gtest/gtest.h> |
20 | 19 |
21 namespace blink { | 20 namespace blink { |
22 | 21 |
23 class EventHandlerTest : public ::testing::Test { | 22 class EventHandlerTest : public ::testing::Test { |
24 protected: | 23 protected: |
25 void SetUp() override; | 24 void SetUp() override; |
26 | 25 |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
91 document().frame()->eventHandler().handleMouseReleaseEvent(mouseUpEvent); | 90 document().frame()->eventHandler().handleMouseReleaseEvent(mouseUpEvent); |
92 | 91 |
93 FrameSelection& selection = document().frame()->selection(); | 92 FrameSelection& selection = document().frame()->selection(); |
94 ASSERT_TRUE(selection.isRange()); | 93 ASSERT_TRUE(selection.isRange()); |
95 RefPtrWillBeRawPtr<Range> range = createRange(selection.selection().toNormal
izedEphemeralRange()); | 94 RefPtrWillBeRawPtr<Range> range = createRange(selection.selection().toNormal
izedEphemeralRange()); |
96 ASSERT_TRUE(range.get()); | 95 ASSERT_TRUE(range.get()); |
97 EXPECT_EQ("Line 1\nLine 2", range->text()); | 96 EXPECT_EQ("Line 1\nLine 2", range->text()); |
98 } | 97 } |
99 | 98 |
100 } // namespace blink | 99 } // namespace blink |
OLD | NEW |