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

Unified 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/web/tests/FrameTestHelpers.cpp
diff --git a/third_party/WebKit/Source/web/tests/FrameTestHelpers.cpp b/third_party/WebKit/Source/web/tests/FrameTestHelpers.cpp
index 52c28c289d69c58dc38cfbece7c7b633d8781e2a..8f895c2f73f5940d6c0920604674260a583e92ea 100644
--- a/third_party/WebKit/Source/web/tests/FrameTestHelpers.cpp
+++ b/third_party/WebKit/Source/web/tests/FrameTestHelpers.cpp
@@ -293,6 +293,11 @@ void WebViewHelper::reset()
m_webViewWidget = nullptr;
}
if (m_webView) {
+ // Loading completion is handled asynchronously
+ // (FrameLoader::checkCompleted()), so we call runPendingTasks() here
+ // to make sure loading is completed and
+ // the ASSERT() in the following line is successful.
+ testing::runPendingTasks();
ASSERT(m_webView->mainFrame()->isWebRemoteFrame() || !testClientForFrame(m_webView->mainFrame())->isLoading());
m_webView->willCloseLayerTreeView();
m_webView->close();
« 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