Chromium Code Reviews| 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()) |
|
tkent
2017/02/10 08:47:41
Why isn't it Position(HTML,0)?
yosin_UTC9
2017/02/10 10:13:20
My reasoning was wrong. I forgot to consider HEAD
|
| + << "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()); |
| } |