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

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

Issue 1303993005: Oilpan: fix build after r201904. (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/EditingUtilities.h" 6 #include "core/editing/EditingUtilities.h"
7 7
8 #include "core/editing/EditingTestBase.h" 8 #include "core/editing/EditingTestBase.h"
9 9
10 namespace blink { 10 namespace blink {
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 77
78 EXPECT_EQ(host, enclosingNodeOfType(Position(one, 0), isEnclosingBlock)); 78 EXPECT_EQ(host, enclosingNodeOfType(Position(one, 0), isEnclosingBlock));
79 EXPECT_EQ(three, enclosingNodeOfType(PositionInComposedTree(one, 0), isEnclo singBlock)); 79 EXPECT_EQ(three, enclosingNodeOfType(PositionInComposedTree(one, 0), isEnclo singBlock));
80 } 80 }
81 81
82 TEST_F(EditingUtilitiesTest, isFirstPositionAfterTable) 82 TEST_F(EditingUtilitiesTest, isFirstPositionAfterTable)
83 { 83 {
84 const char* bodyContent = "<div contenteditable id=host><table id=table><tr> <td>1</td></tr></table><b id=two>22</b></div>"; 84 const char* bodyContent = "<div contenteditable id=host><table id=table><tr> <td>1</td></tr></table><b id=two>22</b></div>";
85 const char* shadowContent = "<content select=#two></content><content select= #table></content>"; 85 const char* shadowContent = "<content select=#two></content><content select= #table></content>";
86 setBodyContent(bodyContent); 86 setBodyContent(bodyContent);
87 RefPtrWillBeRawPtr<ShadowRoot> shadowRoot = setShadowContent(shadowContent, "host"); 87 setShadowContent(shadowContent, "host");
88 updateLayoutAndStyleForPainting(); 88 updateLayoutAndStyleForPainting();
89 Node* host = document().getElementById("host"); 89 Node* host = document().getElementById("host");
90 Node* table = document().getElementById("table"); 90 Node* table = document().getElementById("table");
91 91
92 EXPECT_EQ(table, isFirstPositionAfterTable(createVisiblePosition(Position::a fterNode(table)))); 92 EXPECT_EQ(table, isFirstPositionAfterTable(createVisiblePosition(Position::a fterNode(table))));
93 EXPECT_EQ(table, isFirstPositionAfterTable(createVisiblePosition(PositionInC omposedTree::afterNode(table)))); 93 EXPECT_EQ(table, isFirstPositionAfterTable(createVisiblePosition(PositionInC omposedTree::afterNode(table))));
94 94
95 EXPECT_EQ(table, isFirstPositionAfterTable(createVisiblePosition(Position::l astPositionInNode(table)))); 95 EXPECT_EQ(table, isFirstPositionAfterTable(createVisiblePosition(Position::l astPositionInNode(table))));
96 EXPECT_EQ(table, isFirstPositionAfterTable(createVisiblePosition(PositionInC omposedTree::lastPositionInNode(table)))); 96 EXPECT_EQ(table, isFirstPositionAfterTable(createVisiblePosition(PositionInC omposedTree::lastPositionInNode(table))));
97 97
(...skipping 29 matching lines...) Expand all
127 updateLayoutAndStyleForPainting(); 127 updateLayoutAndStyleForPainting();
128 Node* one = document().getElementById("one"); 128 Node* one = document().getElementById("one");
129 Node* two = document().getElementById("two"); 129 Node* two = document().getElementById("two");
130 Node* three = document().getElementById("three"); 130 Node* three = document().getElementById("three");
131 131
132 EXPECT_EQ(Position(two->firstChild(), 1), nextVisuallyDistinctCandidate(Posi tion(one, 1))); 132 EXPECT_EQ(Position(two->firstChild(), 1), nextVisuallyDistinctCandidate(Posi tion(one, 1)));
133 EXPECT_EQ(PositionInComposedTree(three->firstChild(), 1), nextVisuallyDistin ctCandidate(PositionInComposedTree(one, 1))); 133 EXPECT_EQ(PositionInComposedTree(three->firstChild(), 1), nextVisuallyDistin ctCandidate(PositionInComposedTree(one, 1)));
134 } 134 }
135 135
136 } // namespace blink 136 } // 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