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

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

Issue 2706003002: Get rid of unused functions SelectionAdjuster::adjustSelectionIn{DOM,Flat}Tree (Closed)
Patch Set: 2017-02-20T18:17:58 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/SelectionAdjusterTest.cpp
diff --git a/third_party/WebKit/Source/core/editing/SelectionAdjusterTest.cpp b/third_party/WebKit/Source/core/editing/SelectionAdjusterTest.cpp
deleted file mode 100644
index 1e60262b207090e183d2966a1203d84308dc6464..0000000000000000000000000000000000000000
--- a/third_party/WebKit/Source/core/editing/SelectionAdjusterTest.cpp
+++ /dev/null
@@ -1,47 +0,0 @@
-// Copyright 2014 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "core/editing/SelectionAdjuster.h"
-
-#include "core/editing/EditingTestBase.h"
-
-namespace blink {
-
-class SelectionAdjusterTest : public EditingTestBase {};
-
-TEST_F(SelectionAdjusterTest, adjustSelectionInFlatTree) {
- setBodyContent("<div id=sample>foo</div>");
- VisibleSelectionInFlatTree selectionInFlatTree;
-
- Node* const sample = document().getElementById("sample");
- Node* const foo = sample->firstChild();
- // Select "foo"
- VisibleSelection selection =
- createVisibleSelection(SelectionInDOMTree::Builder()
- .collapse(Position(foo, 0))
- .extend(Position(foo, 3))
- .build());
- SelectionAdjuster::adjustSelectionInFlatTree(&selectionInFlatTree, selection);
- EXPECT_EQ(PositionInFlatTree(foo, 0), selectionInFlatTree.start());
- EXPECT_EQ(PositionInFlatTree(foo, 3), selectionInFlatTree.end());
-}
-
-TEST_F(SelectionAdjusterTest, adjustSelectionInDOMTree) {
- setBodyContent("<div id=sample>foo</div>");
- VisibleSelection selection;
-
- Node* const sample = document().getElementById("sample");
- Node* const foo = sample->firstChild();
- // Select "foo"
- VisibleSelectionInFlatTree selectionInFlatTree =
- createVisibleSelection(SelectionInFlatTree::Builder()
- .collapse(PositionInFlatTree(foo, 0))
- .extend(PositionInFlatTree(foo, 3))
- .build());
- SelectionAdjuster::adjustSelectionInDOMTree(&selection, selectionInFlatTree);
- EXPECT_EQ(Position(foo, 0), selection.start());
- EXPECT_EQ(Position(foo, 3), selection.end());
-}
-
-} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698