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

Side by Side Diff: third_party/WebKit/Source/web/tests/RootScrollerTest.cpp

Issue 2612903007: Migrate WTF::Vector::append() to ::push_back() [part 15 of N] (Closed)
Patch Set: Created 3 years, 11 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
OLDNEW
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/dom/ClientRect.h" 5 #include "core/dom/ClientRect.h"
6 #include "core/frame/BrowserControls.h" 6 #include "core/frame/BrowserControls.h"
7 #include "core/frame/FrameHost.h" 7 #include "core/frame/FrameHost.h"
8 #include "core/frame/FrameView.h" 8 #include "core/frame/FrameView.h"
9 #include "core/frame/RootFrameViewport.h" 9 #include "core/frame/RootFrameViewport.h"
10 #include "core/frame/VisualViewport.h" 10 #include "core/frame/VisualViewport.h"
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 Document* document = mainFrame()->document(); 193 Document* document = mainFrame()->document();
194 Element* iframe = document->createElement("iframe"); 194 Element* iframe = document->createElement("iframe");
195 195
196 EXPECT_EQ(mainFrame()->document(), 196 EXPECT_EQ(mainFrame()->document(),
197 effectiveRootScroller(mainFrame()->document())); 197 effectiveRootScroller(mainFrame()->document()));
198 198
199 // Replace the documentElement with the iframe. The effectiveRootScroller 199 // Replace the documentElement with the iframe. The effectiveRootScroller
200 // should remain the same. 200 // should remain the same.
201 NonThrowableExceptionState nonThrow; 201 NonThrowableExceptionState nonThrow;
202 HeapVector<NodeOrString> nodes; 202 HeapVector<NodeOrString> nodes;
203 nodes.append(NodeOrString::fromNode(iframe)); 203 nodes.push_back(NodeOrString::fromNode(iframe));
204 document->documentElement()->replaceWith(nodes, nonThrow); 204 document->documentElement()->replaceWith(nodes, nonThrow);
205 205
206 mainFrameView()->updateAllLifecyclePhases(); 206 mainFrameView()->updateAllLifecyclePhases();
207 207
208 EXPECT_EQ(mainFrame()->document(), 208 EXPECT_EQ(mainFrame()->document(),
209 effectiveRootScroller(mainFrame()->document())); 209 effectiveRootScroller(mainFrame()->document()));
210 } 210 }
211 211
212 class OverscrollTestWebViewClient : public FrameTestHelpers::TestWebViewClient { 212 class OverscrollTestWebViewClient : public FrameTestHelpers::TestWebViewClient {
213 public: 213 public:
(...skipping 1031 matching lines...) Expand 10 before | Expand all | Expand 10 after
1245 // FrameView without a layout. 1245 // FrameView without a layout.
1246 iframe->remove(); 1246 iframe->remove();
1247 1247
1248 EXPECT_EQ(mainFrameView()->layoutViewportScrollableArea(), 1248 EXPECT_EQ(mainFrameView()->layoutViewportScrollableArea(),
1249 &mainFrameView()->getRootFrameViewport()->layoutViewport()); 1249 &mainFrameView()->getRootFrameViewport()->layoutViewport());
1250 } 1250 }
1251 1251
1252 } // namespace 1252 } // namespace
1253 1253
1254 } // namespace blink 1254 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/web/tests/PrerenderingTest.cpp ('k') | third_party/WebKit/Source/web/tests/ViewportTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698