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

Side by Side Diff: third_party/WebKit/Source/core/editing/VisiblePositionTest.cpp

Issue 1675163002: Rename ComposedTree to FlatTree (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: wip Created 4 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "core/editing/VisiblePosition.h" 5 #include "core/editing/VisiblePosition.h"
6 6
7 #include "core/editing/EditingTestBase.h" 7 #include "core/editing/EditingTestBase.h"
8 #include "core/editing/VisibleUnits.h" 8 #include "core/editing/VisibleUnits.h"
9 9
10 namespace blink { 10 namespace blink {
(...skipping 12 matching lines...) Expand all
23 RefPtrWillBeRawPtr<Element> one = body->querySelector("#one", ASSERT_NO_EXCE PTION); 23 RefPtrWillBeRawPtr<Element> one = body->querySelector("#one", ASSERT_NO_EXCE PTION);
24 RefPtrWillBeRawPtr<Element> two = body->querySelector("#two", ASSERT_NO_EXCE PTION); 24 RefPtrWillBeRawPtr<Element> two = body->querySelector("#two", ASSERT_NO_EXCE PTION);
25 RefPtrWillBeRawPtr<Element> four = shadowRoot->querySelector("#s4", ASSERT_N O_EXCEPTION); 25 RefPtrWillBeRawPtr<Element> four = shadowRoot->querySelector("#s4", ASSERT_N O_EXCEPTION);
26 RefPtrWillBeRawPtr<Element> five = shadowRoot->querySelector("#s5", ASSERT_N O_EXCEPTION); 26 RefPtrWillBeRawPtr<Element> five = shadowRoot->querySelector("#s5", ASSERT_N O_EXCEPTION);
27 27
28 EXPECT_EQ(Position(one->firstChild(), 0), canonicalPositionOf(Position(one, 0))); 28 EXPECT_EQ(Position(one->firstChild(), 0), canonicalPositionOf(Position(one, 0)));
29 EXPECT_EQ(Position(one->firstChild(), 0), createVisiblePosition(Position(one , 0)).deepEquivalent()); 29 EXPECT_EQ(Position(one->firstChild(), 0), createVisiblePosition(Position(one , 0)).deepEquivalent());
30 EXPECT_EQ(Position(one->firstChild(), 2), canonicalPositionOf(Position(two.g et(), 0))); 30 EXPECT_EQ(Position(one->firstChild(), 2), canonicalPositionOf(Position(two.g et(), 0)));
31 EXPECT_EQ(Position(one->firstChild(), 2), createVisiblePosition(Position(two .get(), 0)).deepEquivalent()); 31 EXPECT_EQ(Position(one->firstChild(), 2), createVisiblePosition(Position(two .get(), 0)).deepEquivalent());
32 32
33 EXPECT_EQ(PositionInComposedTree(five->firstChild(), 2), canonicalPositionOf (PositionInComposedTree(one.get(), 0))); 33 EXPECT_EQ(PositionInFlatTree(five->firstChild(), 2), canonicalPositionOf(Pos itionInFlatTree(one.get(), 0)));
34 EXPECT_EQ(PositionInComposedTree(five->firstChild(), 2), createVisiblePositi on(PositionInComposedTree(one.get(), 0)).deepEquivalent()); 34 EXPECT_EQ(PositionInFlatTree(five->firstChild(), 2), createVisiblePosition(P ositionInFlatTree(one.get(), 0)).deepEquivalent());
35 EXPECT_EQ(PositionInComposedTree(four->firstChild(), 2), canonicalPositionOf (PositionInComposedTree(two.get(), 0))); 35 EXPECT_EQ(PositionInFlatTree(four->firstChild(), 2), canonicalPositionOf(Pos itionInFlatTree(two.get(), 0)));
36 EXPECT_EQ(PositionInComposedTree(four->firstChild(), 2), createVisiblePositi on(PositionInComposedTree(two.get(), 0)).deepEquivalent()); 36 EXPECT_EQ(PositionInFlatTree(four->firstChild(), 2), createVisiblePosition(P ositionInFlatTree(two.get(), 0)).deepEquivalent());
37 } 37 }
38 38
39 } // namespace blink 39 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698