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

Unified Diff: content/public/test/test_navigation_observer.cc

Issue 441713002: Use WaitForResizeComplete() instead of waiting for first paint. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 4 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
« no previous file with comments | « content/public/test/test_navigation_observer.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 458c9dcdef037c8186c614b4ac5f4c35be6531ef..bfe74f663589ab4719fd6e74a94504f72888fff4 100644
--- a/content/public/test/test_navigation_observer.cc
+++ b/content/public/test/test_navigation_observer.cc
@@ -46,10 +46,6 @@ class TestNavigationObserver::TestWebContentsObserver
parent_->OnDidStopLoading(web_contents());
}
- virtual void DidFirstVisuallyNonEmptyPaint() OVERRIDE {
- parent_->OnDidFirstVisuallyNonEmptyPaint(web_contents());
- }
-
TestNavigationObserver* parent_;
DISALLOW_COPY_AND_ASSIGN(TestWebContentsObserver);
@@ -57,28 +53,10 @@ class TestNavigationObserver::TestWebContentsObserver
TestNavigationObserver::TestNavigationObserver(
WebContents* web_contents,
- int number_of_navigations,
- FirstPaint first_paint)
- : navigation_started_(false),
- navigations_completed_(0),
- number_of_navigations_(number_of_navigations),
- first_paint_(first_paint),
- message_loop_runner_(new MessageLoopRunner),
- web_contents_created_callback_(
- base::Bind(
- &TestNavigationObserver::OnWebContentsCreated,
- base::Unretained(this))) {
- if (web_contents)
- RegisterAsObserver(web_contents);
-}
-
-TestNavigationObserver::TestNavigationObserver(
- WebContents* web_contents,
int number_of_navigations)
: navigation_started_(false),
navigations_completed_(0),
number_of_navigations_(number_of_navigations),
- first_paint_(FirstPaintNotRequired),
message_loop_runner_(new MessageLoopRunner),
web_contents_created_callback_(
base::Bind(
@@ -93,7 +71,6 @@ TestNavigationObserver::TestNavigationObserver(
: navigation_started_(false),
navigations_completed_(0),
number_of_navigations_(1),
- first_paint_(FirstPaintNotRequired),
message_loop_runner_(new MessageLoopRunner),
web_contents_created_callback_(
base::Bind(
@@ -161,20 +138,7 @@ void TestNavigationObserver::OnDidStopLoading(WebContents* web_contents) {
return;
++navigations_completed_;
- if ((navigations_completed_ == number_of_navigations_) &&
- first_paint_ == FirstPaintNotRequired) {
- navigation_started_ = false;
- message_loop_runner_->Quit();
- }
-}
-
-void TestNavigationObserver::OnDidFirstVisuallyNonEmptyPaint(
- WebContents* web_contents) {
- if (!navigation_started_)
- return;
-
- if ((navigations_completed_ == number_of_navigations_) &&
- first_paint_ == FirstPaintRequired) {
+ if (navigations_completed_ == number_of_navigations_) {
navigation_started_ = false;
message_loop_runner_->Quit();
}
« no previous file with comments | « content/public/test/test_navigation_observer.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698