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

Side by Side Diff: Source/core/editing/EditingUtilitiesTest.cpp

Issue 1308263002: Introduce EditingUtilitiesTest.cpp as a home of nextPositionOf() test (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: 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 unified diff | Download patch
« no previous file with comments | « Source/core/core.gypi ('k') | Source/core/editing/PositionTest.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "config.h"
6 #include "core/editing/EditingUtilities.h"
7
8 #include "core/editing/EditingTestBase.h"
9
10 namespace blink {
11
12 class EditingUtilitiesTest : public EditingTestBase {
13 };
14
15 TEST_F(EditingUtilitiesTest, NextNodeIndex)
16 {
17 const char* bodyContent = "<p id='host'>00<b id='one'>11</b><b id='two'>22</ b>33</p>";
18 const char* shadowContent = "<content select=#two></content><content select= #one></content>";
19 setBodyContent(bodyContent);
20 setShadowContent(shadowContent);
21 Node* host = document().getElementById("host");
22 Node* two = document().getElementById("two");
23
24 EXPECT_EQ(Position(host, 3), nextPositionOf(Position(two, 2), PositionMoveTy pe::CodePoint));
25 EXPECT_EQ(PositionInComposedTree(host, 1), nextPositionOf(PositionInComposed Tree(two, 2), PositionMoveType::CodePoint));
26 }
27
28 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/core.gypi ('k') | Source/core/editing/PositionTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698