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

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

Issue 1323023004: Oilpan: fix build after r201865. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 3 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 | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "config.h" 5 #include "config.h"
6 #include "core/editing/VisibleUnits.h" 6 #include "core/editing/VisibleUnits.h"
7 7
8 #include "core/editing/EditingTestBase.h" 8 #include "core/editing/EditingTestBase.h"
9 #include "core/editing/VisiblePosition.h" 9 #include "core/editing/VisiblePosition.h"
10 10
(...skipping 25 matching lines...) Expand all
36 36
37 class VisibleUnitsTest : public EditingTestBase { 37 class VisibleUnitsTest : public EditingTestBase {
38 }; 38 };
39 39
40 TEST_F(VisibleUnitsTest, absoluteCaretBoundsOf) 40 TEST_F(VisibleUnitsTest, absoluteCaretBoundsOf)
41 { 41 {
42 const char* bodyContent = "<p id='host'><b id='one'>11</b><b id='two'>22</b> </p>"; 42 const char* bodyContent = "<p id='host'><b id='one'>11</b><b id='two'>22</b> </p>";
43 const char* shadowContent = "<div><content select=#two></content><content se lect=#one></content></div>"; 43 const char* shadowContent = "<div><content select=#two></content><content se lect=#one></content></div>";
44 setBodyContent(bodyContent); 44 setBodyContent(bodyContent);
45 RefPtrWillBeRawPtr<ShadowRoot> shadowRoot = setShadowContent(shadowContent, "host"); 45 RefPtrWillBeRawPtr<ShadowRoot> shadowRoot = setShadowContent(shadowContent, "host");
46 ASSERT_UNUSED(shadowRoot, shadowRoot);
46 updateLayoutAndStyleForPainting(); 47 updateLayoutAndStyleForPainting();
47 48
48 RefPtrWillBeRawPtr<Element> body = document().body(); 49 RefPtrWillBeRawPtr<Element> body = document().body();
49 RefPtrWillBeRawPtr<Element> one = body->querySelector("#one", ASSERT_NO_EXCE PTION); 50 RefPtrWillBeRawPtr<Element> one = body->querySelector("#one", ASSERT_NO_EXCE PTION);
50 51
51 IntRect boundsInDOMTree = absoluteCaretBoundsOf(createVisiblePosition(Positi on(one.get(), 0))); 52 IntRect boundsInDOMTree = absoluteCaretBoundsOf(createVisiblePosition(Positi on(one.get(), 0)));
52 IntRect boundsInComposedTree = absoluteCaretBoundsOf(createVisiblePosition(P ositionInComposedTree(one.get(), 0))); 53 IntRect boundsInComposedTree = absoluteCaretBoundsOf(createVisiblePosition(P ositionInComposedTree(one.get(), 0)));
53 54
54 EXPECT_FALSE(boundsInDOMTree.isEmpty()); 55 EXPECT_FALSE(boundsInDOMTree.isEmpty());
55 EXPECT_EQ(boundsInDOMTree, boundsInComposedTree); 56 EXPECT_EQ(boundsInDOMTree, boundsInComposedTree);
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 setBodyContent(bodyContent); 160 setBodyContent(bodyContent);
160 updateLayoutAndStyleForPainting(); 161 updateLayoutAndStyleForPainting();
161 RefPtrWillBeRawPtr<Element> sample1 = document().getElementById("sample1"); 162 RefPtrWillBeRawPtr<Element> sample1 = document().getElementById("sample1");
162 RefPtrWillBeRawPtr<Element> sample2 = document().getElementById("sample2"); 163 RefPtrWillBeRawPtr<Element> sample2 = document().getElementById("sample2");
163 164
164 EXPECT_FALSE(rendersInDifferentPosition(Position::afterNode(sample1->firstCh ild()), Position(sample2->firstChild(), 0))); 165 EXPECT_FALSE(rendersInDifferentPosition(Position::afterNode(sample1->firstCh ild()), Position(sample2->firstChild(), 0)));
165 EXPECT_FALSE(rendersInDifferentPosition(Position::lastPositionInNode(sample1 ->firstChild()), Position(sample2->firstChild(), 0))); 166 EXPECT_FALSE(rendersInDifferentPosition(Position::lastPositionInNode(sample1 ->firstChild()), Position(sample2->firstChild(), 0)));
166 } 167 }
167 168
168 } // namespace blink 169 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698