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

Side by Side Diff: third_party/WebKit/Source/core/dom/DocumentTest.cpp

Issue 2574773002: Migrate WTF::Vector::append() to ::push_back() [part 4 of N] (Closed)
Patch Set: rebase Created 4 years 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
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2014, Google Inc. All rights reserved. 2 * Copyright (c) 2014, Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 Document& document) { 170 Document& document) {
171 setContext(&document); 171 setContext(&document);
172 } 172 }
173 173
174 void TestSynchronousMutationObserver::contextDestroyed() { 174 void TestSynchronousMutationObserver::contextDestroyed() {
175 ++m_contextDestroyedCalledCounter; 175 ++m_contextDestroyedCalledCounter;
176 } 176 }
177 177
178 void TestSynchronousMutationObserver::didChangeChildren( 178 void TestSynchronousMutationObserver::didChangeChildren(
179 const ContainerNode& container) { 179 const ContainerNode& container) {
180 m_childrenChangedNodes.append(&container); 180 m_childrenChangedNodes.push_back(&container);
181 } 181 }
182 182
183 void TestSynchronousMutationObserver::didMergeTextNodes(Text& node, 183 void TestSynchronousMutationObserver::didMergeTextNodes(Text& node,
184 unsigned offset) { 184 unsigned offset) {
185 m_mergeTextNodesRecords.append(new MergeTextNodesRecord(&node, offset)); 185 m_mergeTextNodesRecords.push_back(new MergeTextNodesRecord(&node, offset));
186 } 186 }
187 187
188 void TestSynchronousMutationObserver::didSplitTextNode(const Text& node) { 188 void TestSynchronousMutationObserver::didSplitTextNode(const Text& node) {
189 m_splitTextNodes.append(&node); 189 m_splitTextNodes.push_back(&node);
190 } 190 }
191 191
192 void TestSynchronousMutationObserver::didUpdateCharacterData( 192 void TestSynchronousMutationObserver::didUpdateCharacterData(
193 CharacterData* characterData, 193 CharacterData* characterData,
194 unsigned offset, 194 unsigned offset,
195 unsigned oldLength, 195 unsigned oldLength,
196 unsigned newLength) { 196 unsigned newLength) {
197 m_updatedCharacterDataRecords.append(new UpdateCharacterDataRecord( 197 m_updatedCharacterDataRecords.push_back(new UpdateCharacterDataRecord(
198 characterData, offset, oldLength, newLength)); 198 characterData, offset, oldLength, newLength));
199 } 199 }
200 200
201 void TestSynchronousMutationObserver::nodeChildrenWillBeRemoved( 201 void TestSynchronousMutationObserver::nodeChildrenWillBeRemoved(
202 ContainerNode& container) { 202 ContainerNode& container) {
203 m_removedChildrenNodes.append(&container); 203 m_removedChildrenNodes.push_back(&container);
204 } 204 }
205 205
206 void TestSynchronousMutationObserver::nodeWillBeRemoved(Node& node) { 206 void TestSynchronousMutationObserver::nodeWillBeRemoved(Node& node) {
207 m_removedNodes.append(&node); 207 m_removedNodes.push_back(&node);
208 } 208 }
209 209
210 DEFINE_TRACE(TestSynchronousMutationObserver) { 210 DEFINE_TRACE(TestSynchronousMutationObserver) {
211 visitor->trace(m_childrenChangedNodes); 211 visitor->trace(m_childrenChangedNodes);
212 visitor->trace(m_mergeTextNodesRecords); 212 visitor->trace(m_mergeTextNodesRecords);
213 visitor->trace(m_removedChildrenNodes); 213 visitor->trace(m_removedChildrenNodes);
214 visitor->trace(m_removedNodes); 214 visitor->trace(m_removedNodes);
215 visitor->trace(m_splitTextNodes); 215 visitor->trace(m_splitTextNodes);
216 visitor->trace(m_updatedCharacterDataRecords); 216 visitor->trace(m_updatedCharacterDataRecords);
217 SynchronousMutationObserver::trace(visitor); 217 SynchronousMutationObserver::trace(visitor);
(...skipping 385 matching lines...) Expand 10 before | Expand all | Expand 10 after
603 { 603 {
604 setHtmlInnerHTML( 604 setHtmlInnerHTML(
605 "<body>" 605 "<body>"
606 "<meta name=\"theme-color\" content=\"#00ff00\">"); 606 "<meta name=\"theme-color\" content=\"#00ff00\">");
607 EXPECT_EQ(Color(0, 255, 0), document().themeColor()) 607 EXPECT_EQ(Color(0, 255, 0), document().themeColor())
608 << "Theme color should be bright green."; 608 << "Theme color should be bright green.";
609 } 609 }
610 } 610 }
611 611
612 } // namespace blink 612 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/dom/DocumentStyleSheetCollector.cpp ('k') | third_party/WebKit/Source/core/dom/Element.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698