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

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

Issue 2712223002: Get rid of redundant functions updateIfNeeded() in FrameSelection and SelectionEditor (Closed)
Patch Set: 2017-02-27T11:10:27 Remove updateIfNeeded() from FrameSeleciton.h 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 e284266ef6b8c6fe0569917257f2e7352d0ef05a..63aaf27acca6c9f8983ae59bce0187bdb46a8d43 100644
--- a/third_party/WebKit/Source/core/editing/FrameSelectionTest.cpp
+++ b/third_party/WebKit/Source/core/editing/FrameSelectionTest.cpp
@@ -242,31 +242,4 @@ TEST_F(FrameSelectionTest, SelectAllPreservesHandle) {
"after it.";
}
-TEST_F(FrameSelectionTest, updateIfNeededAndFrameCaret) {
- setBodyContent("<style id=sample></style>");
- document().setDesignMode("on");
- updateAllLifecyclePhases();
- Element* sample = document().getElementById("sample");
- selection().setSelection(
- SelectionInDOMTree::Builder().collapse(Position(sample, 0)).build());
- EXPECT_EQ(Position(document().body(), 0),
- selection().computeVisibleSelectionInDOMTreeDeprecated().start());
- EXPECT_EQ(selection().computeVisibleSelectionInDOMTreeDeprecated().start(),
- caretPosition().position());
- document().body()->remove();
- EXPECT_EQ(Position(),
- selection().computeVisibleSelectionInDOMTreeDeprecated().start())
- << "Selection has been removed by BODY.remove().";
- EXPECT_EQ(selection().computeVisibleSelectionInDOMTreeDeprecated().start(),
- caretPosition().position());
- document().updateStyleAndLayout();
- selection().updateIfNeeded();
-
- EXPECT_EQ(Position(),
- selection().computeVisibleSelectionInDOMTreeDeprecated().start())
- << "selection().updateIfNeeded() does nothing.";
- EXPECT_EQ(selection().computeVisibleSelectionInDOMTreeDeprecated().start(),
- caretPosition().position());
-}
-
} // namespace blink
« 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