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

Unified Diff: third_party/WebKit/Source/core/editing/FrameSelectionTest.cpp

Issue 2680943004: Make FrameSelection to hold non-canonicalized positions (Closed)
Patch Set: 2014-02-14T23:34:22 Update TestExpectation to include extend-{0,2,4}0.html and selectAllChildren.html Created 3 years, 10 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
Index: third_party/WebKit/Source/core/editing/FrameSelectionTest.cpp
diff --git a/third_party/WebKit/Source/core/editing/FrameSelectionTest.cpp b/third_party/WebKit/Source/core/editing/FrameSelectionTest.cpp
index e5e13b0e99c469b8e4185a2418c124bb3eaaf2aa..a0749aea8499222f4b201071312f0ea85302318f 100644
--- a/third_party/WebKit/Source/core/editing/FrameSelectionTest.cpp
+++ b/third_party/WebKit/Source/core/editing/FrameSelectionTest.cpp
@@ -266,17 +266,14 @@ TEST_F(FrameSelectionTest, updateIfNeededAndFrameCaret) {
EXPECT_EQ(Position(document().body(), 0), selection().start());
EXPECT_EQ(selection().start(), caretPosition().position());
document().body()->remove();
- // TODO(yosin): Once lazy canonicalization implemented, selection.start
- // should be Position(HTML, 0).
- EXPECT_EQ(Position(document().documentElement(), 1), selection().start());
+ EXPECT_EQ(Position(), selection().start())
+ << "Selection has been removed by BODY.remove().";
EXPECT_EQ(selection().start(), caretPosition().position());
document().updateStyleAndLayout();
selection().updateIfNeeded();
- // TODO(yosin): Once lazy canonicalization implemented, selection.start
- // should be Position(HTML, 0).
EXPECT_EQ(Position(), selection().start())
- << "updateIfNeeded() makes selection to null.";
+ << "selection().updateIfNeeded() does nothing.";
EXPECT_EQ(selection().start(), caretPosition().position());
}
« no previous file with comments | « third_party/WebKit/Source/core/editing/FrameSelection.cpp ('k') | third_party/WebKit/Source/core/editing/SelectionEditor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698