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" |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
85 IntPoint(200, 250), | 85 IntPoint(200, 250), |
86 LeftButton, | 86 LeftButton, |
87 PlatformEvent::MouseReleased, | 87 PlatformEvent::MouseReleased, |
88 1, | 88 1, |
89 static_cast<PlatformEvent::Modifiers>(0), | 89 static_cast<PlatformEvent::Modifiers>(0), |
90 WTF::currentTime()); | 90 WTF::currentTime()); |
91 document().frame()->eventHandler().handleMouseReleaseEvent(mouseUpEvent); | 91 document().frame()->eventHandler().handleMouseReleaseEvent(mouseUpEvent); |
92 | 92 |
93 FrameSelection& selection = document().frame()->selection(); | 93 FrameSelection& selection = document().frame()->selection(); |
94 ASSERT_TRUE(selection.isRange()); | 94 ASSERT_TRUE(selection.isRange()); |
95 RefPtrWillBeRawPtr<Range> range = selection.toNormalizedRange(); | 95 RefPtrWillBeRawPtr<Range> range = createRange(selection.selection().toNormal
izedEphemeralRange()); |
96 ASSERT_TRUE(range.get()); | 96 ASSERT_TRUE(range.get()); |
97 EXPECT_EQ("Line 1\nLine 2", range->text()); | 97 EXPECT_EQ("Line 1\nLine 2", range->text()); |
98 } | 98 } |
99 | 99 |
100 } // namespace blink | 100 } // namespace blink |
OLD | NEW |