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

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

Issue 2389493002: Revert of Require WebLocalFrame to be created with a non-null client (Closed)
Patch Set: Created 4 years, 2 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 /* 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 257 matching lines...) Expand 10 before | Expand all | Expand 10 after
268 m_testWebViewClient->clearAnimationScheduled(); 268 m_testWebViewClient->clearAnimationScheduled();
269 webView()->resize(size); 269 webView()->resize(size);
270 EXPECT_FALSE(m_testWebViewClient->animationScheduled()); 270 EXPECT_FALSE(m_testWebViewClient->animationScheduled());
271 m_testWebViewClient->clearAnimationScheduled(); 271 m_testWebViewClient->clearAnimationScheduled();
272 } 272 }
273 273
274 TestWebFrameClient::TestWebFrameClient() 274 TestWebFrameClient::TestWebFrameClient()
275 { 275 {
276 } 276 }
277 277
278 WebLocalFrame* TestWebFrameClient::createChildFrame(WebLocalFrame* parent, WebTr eeScopeType scope, const WebString& name, const WebString& uniqueName, WebSandbo xFlags sandboxFlags, const WebFrameOwnerProperties& frameOwnerProperties) 278 WebFrame* TestWebFrameClient::createChildFrame(WebLocalFrame* parent, WebTreeSco peType scope, const WebString& name, const WebString& uniqueName, WebSandboxFlag s sandboxFlags, const WebFrameOwnerProperties& frameOwnerProperties)
279 { 279 {
280 WebLocalFrame* frame = WebLocalFrame::create(scope, this); 280 WebFrame* frame = WebLocalFrame::create(scope, this);
281 parent->appendChild(frame); 281 parent->appendChild(frame);
282 return frame; 282 return frame;
283 } 283 }
284 284
285 void TestWebFrameClient::frameDetached(WebLocalFrame* frame, DetachType type)
286 {
287 if (type == DetachType::Remove && frame->parent())
288 frame->parent()->removeChild(frame);
289
290 if (frame->frameWidget())
291 frame->frameWidget()->close();
292
293 frame->close();
294 }
295
285 void TestWebFrameClient::didStartLoading(bool) 296 void TestWebFrameClient::didStartLoading(bool)
286 { 297 {
287 ++m_loadsInProgress; 298 ++m_loadsInProgress;
288 } 299 }
289 300
290 void TestWebFrameClient::didStopLoading() 301 void TestWebFrameClient::didStopLoading()
291 { 302 {
292 DCHECK_GT(m_loadsInProgress, 0); 303 DCHECK_GT(m_loadsInProgress, 0);
293 --m_loadsInProgress; 304 --m_loadsInProgress;
294 } 305 }
(...skipping 30 matching lines...) Expand all
325 m_testWebViewClient->scheduleAnimation(); 336 m_testWebViewClient->scheduleAnimation();
326 } 337 }
327 338
328 void TestWebViewWidgetClient::didMeaningfulLayout(WebMeaningfulLayout layoutType ) 339 void TestWebViewWidgetClient::didMeaningfulLayout(WebMeaningfulLayout layoutType )
329 { 340 {
330 m_testWebViewClient->didMeaningfulLayout(layoutType); 341 m_testWebViewClient->didMeaningfulLayout(layoutType);
331 } 342 }
332 343
333 } // namespace FrameTestHelpers 344 } // namespace FrameTestHelpers
334 } // namespace blink 345 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/web/tests/FrameTestHelpers.h ('k') | third_party/WebKit/Source/web/tests/WebFrameTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698