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

Unified Diff: Source/core/editing/VisibleUnitsTest.cpp

Issue 1319623004: Improve VisibleUnitsTest.localCaretRectOfPosition (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: 2015-08-26T10:49:59 Created 5 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/editing/VisibleUnitsTest.cpp
diff --git a/Source/core/editing/VisibleUnitsTest.cpp b/Source/core/editing/VisibleUnitsTest.cpp
index 516004f258581ed349e9085e2a19de03532890ff..107baf8816b205c3fff528778622fb58332f8ec3 100644
--- a/Source/core/editing/VisibleUnitsTest.cpp
+++ b/Source/core/editing/VisibleUnitsTest.cpp
@@ -63,11 +63,13 @@ TEST_F(VisibleUnitsTest, localCaretRectOfPosition)
RefPtrWillBeRawPtr<Element> one = document().getElementById("one");
LayoutObject* layoutObjectFromDOMTree;
- LayoutRect layoutRectFromDOMTree = localCaretRectOfPosition(Position(one, 0), layoutObjectFromDOMTree);
+ LayoutRect layoutRectFromDOMTree = localCaretRectOfPosition(Position(one->firstChild(), 0), layoutObjectFromDOMTree);
LayoutObject* layoutObjectFromComposedTree;
- LayoutRect layoutRectFromComposedTree = localCaretRectOfPosition(PositionInComposedTree(one, 0), layoutObjectFromComposedTree);
+ LayoutRect layoutRectFromComposedTree = localCaretRectOfPosition(PositionInComposedTree(one->firstChild(), 0), layoutObjectFromComposedTree);
+ EXPECT_TRUE(layoutObjectFromDOMTree);
+ EXPECT_FALSE(layoutRectFromDOMTree.isEmpty());
EXPECT_EQ(layoutObjectFromDOMTree, layoutObjectFromComposedTree);
EXPECT_EQ(layoutRectFromDOMTree, layoutRectFromComposedTree);
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698