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

Unified Diff: chrome/test/base/in_process_browser_test.cc

Issue 330113002: Fixing flaky overscroll and touch exploration mode browser tests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Cleanup Created 6 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 side-by-side diff with in-line comments
Download patch
Index: chrome/test/base/in_process_browser_test.cc
diff --git a/chrome/test/base/in_process_browser_test.cc b/chrome/test/base/in_process_browser_test.cc
index 82c0706dda5ab9cfdcbf5fe43d4da28166e836fc..088b6a971d686d4c54c5f201f10b6a59a9bc1d57 100644
--- a/chrome/test/base/in_process_browser_test.cc
+++ b/chrome/test/base/in_process_browser_test.cc
@@ -392,8 +392,16 @@ void InProcessBrowserTest::RunTestOnMainThreadLoop() {
if (browser_->window()->IsMaximized())
browser_->window()->Restore();
#endif
- content::WaitForLoadStop(
- browser_->tab_strip_model()->GetActiveWebContents());
+ content::WebContents* web_contents =
+ browser_->tab_strip_model()->GetActiveWebContents();
+ content::WaitForLoadStop(web_contents);
+ // The RenderView for WebContents is created as a result of the navigation
+ // to the New Tab page. The creation involves sending a resize message to
+ // the renderer process. Here we wait for the resize ack to be received,
+ // since tests may not expect to start in a "waiting for resize" state.
+ // E.g. currently WindowEventDispatcher has code to hold touch and mouse
+ // move events until resize is complete (crbug.com/384342)
+ content::WaitForResizeComplete(web_contents);
}
#if !defined(OS_ANDROID) && !defined(OS_IOS)

Powered by Google App Engine
This is Rietveld 408576698