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 09151e89135750a398e7a6b909227f4418abb1ed..19fabc35b578cb7666cda4e9b952e1179db7ad87 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::DidCommitNavigation( |
@@ -154,6 +156,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); |
} |
@@ -169,6 +172,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); |