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

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

Issue 2694823002: Revert of Make FrameSelection to hold non-canonicalized positions (Closed)
Patch Set: Merge branch 'master' of https://chromium.googlesource.com/chromium/src into patch_revert 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 a0749aea8499222f4b201071312f0ea85302318f..e5e13b0e99c469b8e4185a2418c124bb3eaaf2aa 100644
--- a/third_party/WebKit/Source/core/editing/FrameSelectionTest.cpp
+++ b/third_party/WebKit/Source/core/editing/FrameSelectionTest.cpp
@@ -266,14 +266,17 @@ TEST_F(FrameSelectionTest, updateIfNeededAndFrameCaret) {
EXPECT_EQ(Position(document().body(), 0), selection().start());
EXPECT_EQ(selection().start(), caretPosition().position());
document().body()->remove();
- EXPECT_EQ(Position(), selection().start())
- << "Selection has been removed by 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(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())
- << "selection().updateIfNeeded() does nothing.";
+ << "updateIfNeeded() makes selection to null.";
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