| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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/EphemeralRange.h" | 5 #include "core/editing/EphemeralRange.h" |
| 6 | 6 |
| 7 #include <sstream> |
| 7 #include "core/dom/Range.h" | 8 #include "core/dom/Range.h" |
| 8 #include "core/editing/EditingTestBase.h" | 9 #include "core/editing/EditingTestBase.h" |
| 9 #include <sstream> | |
| 10 | 10 |
| 11 namespace blink { | 11 namespace blink { |
| 12 | 12 |
| 13 class EphemeralRangeTest : public EditingTestBase { | 13 class EphemeralRangeTest : public EditingTestBase { |
| 14 protected: | 14 protected: |
| 15 template <typename Traversal = NodeTraversal> | 15 template <typename Traversal = NodeTraversal> |
| 16 std::string TraverseRange(Range*) const; | 16 std::string TraverseRange(Range*) const; |
| 17 | 17 |
| 18 template <typename Strategy> | 18 template <typename Strategy> |
| 19 std::string TraverseRange(const EphemeralRangeTemplate<Strategy>&) const; | 19 std::string TraverseRange(const EphemeralRangeTemplate<Strategy>&) const; |
| (...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 220 | 220 |
| 221 const PositionInFlatTree start_position(GetDocument().getElementById("one"), | 221 const PositionInFlatTree start_position(GetDocument().getElementById("one"), |
| 222 0); | 222 0); |
| 223 const PositionInFlatTree end_position(shadow_root->getElementById("five"), 0); | 223 const PositionInFlatTree end_position(shadow_root->getElementById("five"), 0); |
| 224 const EphemeralRangeInFlatTree range(start_position, end_position); | 224 const EphemeralRangeInFlatTree range(start_position, end_position); |
| 225 EXPECT_EQ(GetDocument().getElementById("host"), | 225 EXPECT_EQ(GetDocument().getElementById("host"), |
| 226 range.CommonAncestorContainer()); | 226 range.CommonAncestorContainer()); |
| 227 } | 227 } |
| 228 | 228 |
| 229 } // namespace blink | 229 } // namespace blink |
| OLD | NEW |