OLD | NEW |
(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 |
OLD | NEW |