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

Unified Diff: content/public/test/test_navigation_observer.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: 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: content/public/test/test_navigation_observer.cc
diff --git a/content/public/test/test_navigation_observer.cc b/content/public/test/test_navigation_observer.cc
index bfe74f663589ab4719fd6e74a94504f72888fff4..c13d98f0693b21d3db17075fd8643c27d7089798 100644
--- a/content/public/test/test_navigation_observer.cc
+++ b/content/public/test/test_navigation_observer.cc
@@ -10,6 +10,7 @@
#include "base/stl_util.h"
#include "content/browser/web_contents/web_contents_impl.h"
#include "content/public/browser/web_contents_observer.h"
+#include "content/public/test/browser_test_utils.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace content {
@@ -54,7 +55,8 @@ class TestNavigationObserver::TestWebContentsObserver
TestNavigationObserver::TestNavigationObserver(
WebContents* web_contents,
int number_of_navigations)
- : navigation_started_(false),
+ : web_contents_(web_contents),
+ navigation_started_(false),
navigations_completed_(0),
number_of_navigations_(number_of_navigations),
message_loop_runner_(new MessageLoopRunner),
@@ -68,7 +70,8 @@ TestNavigationObserver::TestNavigationObserver(
TestNavigationObserver::TestNavigationObserver(
WebContents* web_contents)
- : navigation_started_(false),
+ : web_contents_(web_contents),
+ navigation_started_(false),
navigations_completed_(0),
number_of_navigations_(1),
message_loop_runner_(new MessageLoopRunner),
@@ -89,6 +92,7 @@ TestNavigationObserver::~TestNavigationObserver() {
void TestNavigationObserver::Wait() {
message_loop_runner_->Run();
+ WaitForResizeComplete(web_contents_);
}
void TestNavigationObserver::StartWatchingNewWebContents() {

Powered by Google App Engine
This is Rietveld 408576698