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

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

Issue 1475863005: [Async][WIP] Call FrameLoader::checkCompleted() asynchronously to avoid sync body.onload() Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 4 years, 10 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 275 matching lines...) Expand 10 before | Expand all | Expand 10 after
286 return webViewImpl(); 286 return webViewImpl();
287 } 287 }
288 288
289 void WebViewHelper::reset() 289 void WebViewHelper::reset()
290 { 290 {
291 if (m_webViewWidget) { 291 if (m_webViewWidget) {
292 m_webViewWidget->close(); 292 m_webViewWidget->close();
293 m_webViewWidget = nullptr; 293 m_webViewWidget = nullptr;
294 } 294 }
295 if (m_webView) { 295 if (m_webView) {
296 // Loading completion is handled asynchronously
297 // (FrameLoader::checkCompleted()), so we call runPendingTasks() here
298 // to make sure loading is completed and
299 // the ASSERT() in the following line is successful.
300 testing::runPendingTasks();
296 ASSERT(m_webView->mainFrame()->isWebRemoteFrame() || !testClientForFrame (m_webView->mainFrame())->isLoading()); 301 ASSERT(m_webView->mainFrame()->isWebRemoteFrame() || !testClientForFrame (m_webView->mainFrame())->isLoading());
297 m_webView->willCloseLayerTreeView(); 302 m_webView->willCloseLayerTreeView();
298 m_webView->close(); 303 m_webView->close();
299 m_webView = nullptr; 304 m_webView = nullptr;
300 } 305 }
301 } 306 }
302 307
303 void WebViewHelper::resize(WebSize size) 308 void WebViewHelper::resize(WebSize size)
304 { 309 {
305 m_testWebViewClient->clearAnimationScheduled(); 310 m_testWebViewClient->clearAnimationScheduled();
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
365 } 370 }
366 371
367 void TestWebViewClient::initializeLayerTreeView() 372 void TestWebViewClient::initializeLayerTreeView()
368 { 373 {
369 m_layerTreeView = adoptPtr(Platform::current()->unitTestSupport()->createLay erTreeViewForTesting()); 374 m_layerTreeView = adoptPtr(Platform::current()->unitTestSupport()->createLay erTreeViewForTesting());
370 ASSERT(m_layerTreeView); 375 ASSERT(m_layerTreeView);
371 } 376 }
372 377
373 } // namespace FrameTestHelpers 378 } // namespace FrameTestHelpers
374 } // namespace blink 379 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/web/WebRemoteFrameImpl.cpp ('k') | third_party/WebKit/Source/web/tests/sim/SimRequest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698