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

Side by Side Diff: Source/web/tests/FrameTestHelpers.cpp

Issue 1177333002: Revert of Detach old frame on WebFrame::swap. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 6 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 | « Source/web/tests/FrameTestHelpers.h ('k') | Source/web/tests/WebFrameTest.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2011 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 275 matching lines...) Expand 10 before | Expand all | Expand 10 after
286 { 286 {
287 } 287 }
288 288
289 WebFrame* TestWebFrameClient::createChildFrame(WebLocalFrame* parent, WebTreeSco peType scope, const WebString& frameName, WebSandboxFlags sandboxFlags) 289 WebFrame* TestWebFrameClient::createChildFrame(WebLocalFrame* parent, WebTreeSco peType scope, const WebString& frameName, WebSandboxFlags sandboxFlags)
290 { 290 {
291 WebFrame* frame = WebLocalFrame::create(scope, this); 291 WebFrame* frame = WebLocalFrame::create(scope, this);
292 parent->appendChild(frame); 292 parent->appendChild(frame);
293 return frame; 293 return frame;
294 } 294 }
295 295
296 void TestWebFrameClient::frameDetached(WebFrame* frame, DetachType type) 296 void TestWebFrameClient::frameDetached(WebFrame* frame)
297 { 297 {
298 if (type == DetachType::Remove && frame->parent()) 298 if (frame->parent())
299 frame->parent()->removeChild(frame); 299 frame->parent()->removeChild(frame);
300 frame->close(); 300 frame->close();
301 } 301 }
302 302
303 void TestWebFrameClient::didStartLoading(bool) 303 void TestWebFrameClient::didStartLoading(bool)
304 { 304 {
305 ++m_loadsInProgress; 305 ++m_loadsInProgress;
306 } 306 }
307 307
308 void TestWebFrameClient::didStopLoading() 308 void TestWebFrameClient::didStopLoading()
(...skipping 15 matching lines...) Expand all
324 324
325 Platform::current()->yieldCurrentThread(); 325 Platform::current()->yieldCurrentThread();
326 } 326 }
327 } 327 }
328 328
329 TestWebRemoteFrameClient::TestWebRemoteFrameClient() 329 TestWebRemoteFrameClient::TestWebRemoteFrameClient()
330 : m_frame(WebRemoteFrame::create(WebTreeScopeType::Document, this)) 330 : m_frame(WebRemoteFrame::create(WebTreeScopeType::Document, this))
331 { 331 {
332 } 332 }
333 333
334 void TestWebRemoteFrameClient::frameDetached(DetachType type) 334 void TestWebRemoteFrameClient::frameDetached()
335 { 335 {
336 if (type == DetachType::Remove && m_frame->parent()) 336 if (m_frame->parent())
337 m_frame->parent()->removeChild(m_frame); 337 m_frame->parent()->removeChild(m_frame);
338 m_frame->close(); 338 m_frame->close();
339 } 339 }
340 340
341 void TestWebViewClient::initializeLayerTreeView() 341 void TestWebViewClient::initializeLayerTreeView()
342 { 342 {
343 m_layerTreeView = adoptPtr(Platform::current()->unitTestSupport()->createLay erTreeViewForTesting()); 343 m_layerTreeView = adoptPtr(Platform::current()->unitTestSupport()->createLay erTreeViewForTesting());
344 ASSERT(m_layerTreeView); 344 ASSERT(m_layerTreeView);
345 } 345 }
346 346
347 } // namespace FrameTestHelpers 347 } // namespace FrameTestHelpers
348 } // namespace blink 348 } // namespace blink
OLDNEW
« no previous file with comments | « Source/web/tests/FrameTestHelpers.h ('k') | Source/web/tests/WebFrameTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698