Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(10)

Side by Side Diff: third_party/WebKit/Source/core/editing/GranularityStrategyTest.cpp

Issue 2817863002: Rewrite references to "wtf/" to "platform/wtf/" in core/editing. (Closed)
Patch Set: Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 <memory>
5 #include "bindings/core/v8/ExceptionState.h" 6 #include "bindings/core/v8/ExceptionState.h"
6 #include "core/dom/Document.h" 7 #include "core/dom/Document.h"
7 #include "core/dom/Element.h" 8 #include "core/dom/Element.h"
8 #include "core/dom/Text.h" 9 #include "core/dom/Text.h"
9 #include "core/editing/FrameSelection.h" 10 #include "core/editing/FrameSelection.h"
10 #include "core/frame/FrameView.h" 11 #include "core/frame/FrameView.h"
11 #include "core/frame/Settings.h" 12 #include "core/frame/Settings.h"
12 #include "core/html/HTMLBodyElement.h" 13 #include "core/html/HTMLBodyElement.h"
13 #include "core/html/HTMLSpanElement.h" 14 #include "core/html/HTMLSpanElement.h"
14 #include "core/testing/DummyPageHolder.h" 15 #include "core/testing/DummyPageHolder.h"
15 #include "platform/heap/Handle.h" 16 #include "platform/heap/Handle.h"
17 #include "platform/wtf/PassRefPtr.h"
18 #include "platform/wtf/RefPtr.h"
19 #include "platform/wtf/StdLibExtras.h"
16 #include "testing/gtest/include/gtest/gtest.h" 20 #include "testing/gtest/include/gtest/gtest.h"
17 #include "wtf/PassRefPtr.h"
18 #include "wtf/RefPtr.h"
19 #include "wtf/StdLibExtras.h"
20 #include <memory>
21 21
22 namespace blink { 22 namespace blink {
23 23
24 #define EXPECT_EQ_SELECTED_TEXT(text) \ 24 #define EXPECT_EQ_SELECTED_TEXT(text) \
25 EXPECT_EQ(text, WebString(Selection().SelectedText()).Utf8()) 25 EXPECT_EQ(text, WebString(Selection().SelectedText()).Utf8())
26 26
27 IntPoint VisiblePositionToContentsPoint(const VisiblePosition& pos) { 27 IntPoint VisiblePositionToContentsPoint(const VisiblePosition& pos) {
28 IntPoint result = AbsoluteSelectionBoundsOf(pos).MinXMaxYCorner(); 28 IntPoint result = AbsoluteSelectionBoundsOf(pos).MinXMaxYCorner();
29 // Need to move the point at least by 1 - caret's minXMaxYCorner is not 29 // Need to move the point at least by 1 - caret's minXMaxYCorner is not
30 // evaluated to the same line as the text by hit testing. 30 // evaluated to the same line as the text by hit testing.
(...skipping 739 matching lines...) Expand 10 before | Expand all | Expand 10 after
770 << "This test requires null position."; 770 << "This test requires null position.";
771 771
772 // Point to RANGE inside shadow root to get null position from 772 // Point to RANGE inside shadow root to get null position from
773 // |visiblePositionForContentsPoint()|. 773 // |visiblePositionForContentsPoint()|.
774 Selection().MoveRangeSelectionExtent(IntPoint(0, 0)); 774 Selection().MoveRangeSelectionExtent(IntPoint(0, 0));
775 775
776 EXPECT_EQ(selection_in_dom_tree, Selection().GetSelectionInDOMTree()); 776 EXPECT_EQ(selection_in_dom_tree, Selection().GetSelectionInDOMTree());
777 } 777 }
778 778
779 } // namespace blink 779 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698