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

Unified Diff: Source/core/editing/PositionTest.cpp

Issue 1302353002: Get rid of redundant member function PositionAlgorithm<Strategy>::{upstream,downstream} (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: 2015-08-22T04:51:20 Rebase Created 5 years, 4 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
« no previous file with comments | « Source/core/editing/Position.cpp ('k') | Source/core/editing/SelectionController.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/editing/PositionTest.cpp
diff --git a/Source/core/editing/PositionTest.cpp b/Source/core/editing/PositionTest.cpp
index c932b69fbaa101bf124a801b8dcade57c56475dd..b368ea4def50382187032285cd26d57fc53ef6b4 100644
--- a/Source/core/editing/PositionTest.cpp
+++ b/Source/core/editing/PositionTest.cpp
@@ -6,26 +6,13 @@
#include "core/editing/Position.h"
#include "core/editing/EditingTestBase.h"
+#include "core/editing/EditingUtilities.h"
namespace blink {
class PositionTest : public EditingTestBase {
};
-TEST_F(PositionTest, downstreamAfterAnchor)
-{
- const char* bodyContent = "<p id='host'><b id='one'>1</b></p><b id='two'>22</b>";
- const char* shadowContent = "<b id='two'>22</b><content select=#one></content><b id='three'>333</b>";
- setBodyContent(bodyContent);
- setShadowContent(shadowContent);
- updateLayoutAndStyleForPainting();
-
- RefPtrWillBeRawPtr<Element> host = document().getElementById("host");
-
- EXPECT_EQ(Position::lastPositionInNode(host.get()), Position::afterNode(host.get()).downstream());
- EXPECT_EQ(PositionInComposedTree::lastPositionInNode(host.get()), PositionInComposedTree::afterNode(host.get()).downstream());
-}
-
// TODO(yoisn) We should move |NextNodeIndex| to "EditingUtilitiesTest.cpp".
TEST_F(PositionTest, NextNodeIndex)
{
@@ -161,20 +148,4 @@ TEST_F(PositionTest, ToPositionInComposedTreeWithEmptyShadowRoot)
EXPECT_EQ(PositionInComposedTree(host, PositionAnchorType::AfterChildren), toPositionInComposedTree(Position(shadowRoot.get(), 0)));
}
-TEST_F(PositionTest, upstreamAfterAnchor)
-{
- const char* bodyContent = "<p id='host'><b id='one'>1</b></p>";
- const char* shadowContent = "<b id='two'>22</b><content select=#one></content><b id='three'>333</b>";
- setBodyContent(bodyContent);
- RefPtrWillBeRawPtr<ShadowRoot> shadowRoot = setShadowContent(shadowContent);
- updateLayoutAndStyleForPainting();
-
- RefPtrWillBeRawPtr<Element> host = document().getElementById("host");
- RefPtrWillBeRawPtr<Element> one = document().getElementById("one");
- RefPtrWillBeRawPtr<Element> three = shadowRoot->getElementById("three");
-
- EXPECT_EQ(Position(one->firstChild(), 1), Position::afterNode(host.get()).upstream());
- EXPECT_EQ(PositionInComposedTree(three->firstChild(), 3), PositionInComposedTree::afterNode(host.get()).upstream());
-}
-
} // namespace blink
« no previous file with comments | « Source/core/editing/Position.cpp ('k') | Source/core/editing/SelectionController.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698