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

Unified Diff: content/test/web_contents_observer_sanity_checker.cc

Issue 1363483007: Reland of Add a NavigationThrottle to the public content/ interface (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase 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 f3b0f7258eb37c13513921c9ced627138024057d..2754ddeba4970367e297c5eb737e79a608faeff4 100644
--- a/content/test/web_contents_observer_sanity_checker.cc
+++ b/content/test/web_contents_observer_sanity_checker.cc
@@ -128,6 +128,7 @@ void WebContentsObserverSanityChecker::DidStartNavigation(
CHECK(navigation_handle->GetNetErrorCode() == net::OK);
CHECK(!navigation_handle->HasCommitted());
CHECK(!navigation_handle->IsErrorPage());
+ CHECK_EQ(navigation_handle->GetWebContents(), web_contents());
ongoing_navigations_.insert(navigation_handle);
}
@@ -139,6 +140,7 @@ void WebContentsObserverSanityChecker::DidRedirectNavigation(
CHECK(navigation_handle->GetNetErrorCode() == net::OK);
CHECK(!navigation_handle->HasCommitted());
CHECK(!navigation_handle->IsErrorPage());
+ CHECK_EQ(navigation_handle->GetWebContents(), web_contents());
}
void WebContentsObserverSanityChecker::ReadyToCommitNavigation(
@@ -147,6 +149,8 @@ void WebContentsObserverSanityChecker::ReadyToCommitNavigation(
CHECK(!navigation_handle->HasCommitted());
CHECK(navigation_handle->GetRenderFrameHost());
+ CHECK_EQ(navigation_handle->GetWebContents(), web_contents());
+ CHECK(navigation_handle->GetRenderFrameHost() != nullptr);
}
void WebContentsObserverSanityChecker::DidFinishNavigation(
@@ -159,6 +163,7 @@ void WebContentsObserverSanityChecker::DidFinishNavigation(
CHECK_IMPLIES(
navigation_handle->HasCommitted() && navigation_handle->IsErrorPage(),
navigation_handle->GetNetErrorCode() != net::OK);
+ CHECK_EQ(navigation_handle->GetWebContents(), web_contents());
CHECK_IMPLIES(navigation_handle->HasCommitted(),
navigation_handle->GetRenderFrameHost() != nullptr);
« 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