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

Unified Diff: content/test/web_contents_observer_sanity_checker.cc

Issue 1269813002: Add a NavigationThrottle to the public content/ interface (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@navigation-api
Patch Set: Rebase on https://codereview.chromium.org/1312213010/ Created 5 years, 3 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/browser/navigation_throttle.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/test/web_contents_observer_sanity_checker.cc
diff --git a/content/test/web_contents_observer_sanity_checker.cc b/content/test/web_contents_observer_sanity_checker.cc
index 82bcb60461840a005453f0d271ce50cd3de1e7bd..18d38ae0549037f2b752ad7cd00b9938c8c118f4 100644
--- a/content/test/web_contents_observer_sanity_checker.cc
+++ b/content/test/web_contents_observer_sanity_checker.cc
@@ -129,6 +129,7 @@ void WebContentsObserverSanityChecker::DidStartNavigation(
CHECK(navigation_handle->GetNetErrorCode() == net::OK);
CHECK(!navigation_handle->HasCommittedDocument());
CHECK(!navigation_handle->HasCommittedErrorPage());
+ CHECK_EQ(navigation_handle->GetWebContents(), web_contents());
ongoing_navigations_.insert(navigation_handle);
}
@@ -141,6 +142,7 @@ void WebContentsObserverSanityChecker::DidRedirectNavigation(
CHECK(navigation_handle->GetNetErrorCode() == net::OK);
CHECK(!navigation_handle->HasCommittedDocument());
CHECK(!navigation_handle->HasCommittedErrorPage());
+ CHECK_EQ(navigation_handle->GetWebContents(), web_contents());
}
void WebContentsObserverSanityChecker::ReadyToCommitNavigation(
@@ -163,6 +165,7 @@ void WebContentsObserverSanityChecker::DidCommitNavigation(
navigation_handle->GetNetErrorCode() == net::OK);
CHECK_IMPLIES(navigation_handle->HasCommittedErrorPage(),
navigation_handle->GetNetErrorCode() != net::OK);
+ CHECK_EQ(navigation_handle->GetWebContents(), web_contents());
ongoing_committed_navigations_.insert(navigation_handle);
}
@@ -178,6 +181,7 @@ void WebContentsObserverSanityChecker::DidFinishNavigation(
navigation_handle->GetNetErrorCode() == net::OK);
CHECK_IMPLIES(navigation_handle->HasCommittedErrorPage(),
navigation_handle->GetNetErrorCode() != net::OK);
+ CHECK_EQ(navigation_handle->GetWebContents(), web_contents());
if (NavigationIsOngoingAndCommitted(navigation_handle))
ongoing_committed_navigations_.erase(navigation_handle);
« no previous file with comments | « content/public/browser/navigation_throttle.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698