Commit db08e18f authored by Mohamed Abdelhalim's avatar Mohamed Abdelhalim Committed by Commit Bot

Navigation: Remove NavigationHandleImpl usages 3.

This is the 3rd CL of multiple CLs to remove the usages of
NavigationHandleImpl completely and replace it with NavigationRequest.

This CL replaces NavigationHandleImpl in MixedContentNavigationThrottle
and NavigationHandleImplBrowserTest with NavigationRequest, and renames
NavigationHandleImplBrowserTest to NavigationRequestBrowserTest.

Bug: 995268
Change-Id: Ia0d76dda052f4cea67586cafdc51635a4a3c8a1d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1803447
Commit-Queue: Mohamed Abdelhalim <zetamoo@chromium.org>
Reviewed-by: default avatarArthur Sonzogni <arthursonzogni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#697560}
parent 77a24110
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
#include "base/stl_util.h" #include "base/stl_util.h"
#include "content/browser/frame_host/frame_tree.h" #include "content/browser/frame_host/frame_tree.h"
#include "content/browser/frame_host/frame_tree_node.h" #include "content/browser/frame_host/frame_tree_node.h"
#include "content/browser/frame_host/navigation_handle_impl.h" #include "content/browser/frame_host/navigation_request.h"
#include "content/browser/frame_host/render_frame_host_delegate.h" #include "content/browser/frame_host/render_frame_host_delegate.h"
#include "content/browser/renderer_host/render_view_host_impl.h" #include "content/browser/renderer_host/render_view_host_impl.h"
#include "content/common/frame_messages.h" #include "content/common/frame_messages.h"
...@@ -67,7 +67,7 @@ bool DoesOriginSchemeRestrictMixedContent(const url::Origin& origin) { ...@@ -67,7 +67,7 @@ bool DoesOriginSchemeRestrictMixedContent(const url::Origin& origin) {
return origin.scheme() == url::kHttpsScheme; return origin.scheme() == url::kHttpsScheme;
} }
void UpdateRendererOnMixedContentFound(NavigationHandleImpl* navigation_handle, void UpdateRendererOnMixedContentFound(NavigationRequest* navigation_request,
const GURL& mixed_content_url, const GURL& mixed_content_url,
bool was_allowed, bool was_allowed,
bool for_redirect) { bool for_redirect) {
...@@ -75,17 +75,19 @@ void UpdateRendererOnMixedContentFound(NavigationHandleImpl* navigation_handle, ...@@ -75,17 +75,19 @@ void UpdateRendererOnMixedContentFound(NavigationHandleImpl* navigation_handle,
// mixed content for now. Once/if the browser should also check form submits // mixed content for now. Once/if the browser should also check form submits
// for mixed content than this will be allowed to happen and this DCHECK // for mixed content than this will be allowed to happen and this DCHECK
// should be updated. // should be updated.
DCHECK(navigation_handle->frame_tree_node()->parent()); DCHECK(navigation_request->frame_tree_node()->parent());
RenderFrameHost* rfh = RenderFrameHost* rfh =
navigation_handle->frame_tree_node()->current_frame_host(); navigation_request->frame_tree_node()->current_frame_host();
FrameMsg_MixedContentFound_Params params; FrameMsg_MixedContentFound_Params params;
params.main_resource_url = mixed_content_url; params.main_resource_url = mixed_content_url;
params.mixed_content_url = navigation_handle->GetURL(); params.mixed_content_url = navigation_request->GetURL();
params.request_context_type = navigation_handle->request_context_type(); params.request_context_type = navigation_request->request_context_type();
params.was_allowed = was_allowed; params.was_allowed = was_allowed;
params.had_redirect = for_redirect; params.had_redirect = for_redirect;
if (navigation_handle->source_location()) if (navigation_request->common_params().source_location) {
params.source_location = navigation_handle->source_location().value(); params.source_location =
navigation_request->common_params().source_location.value();
}
rfh->Send(new FrameMsg_MixedContentFound(rfh->GetRoutingID(), params)); rfh->Send(new FrameMsg_MixedContentFound(rfh->GetRoutingID(), params));
} }
...@@ -135,13 +137,12 @@ const char* MixedContentNavigationThrottle::GetNameForLogging() { ...@@ -135,13 +137,12 @@ const char* MixedContentNavigationThrottle::GetNameForLogging() {
// Based off of MixedContentChecker::shouldBlockFetch. // Based off of MixedContentChecker::shouldBlockFetch.
bool MixedContentNavigationThrottle::ShouldBlockNavigation(bool for_redirect) { bool MixedContentNavigationThrottle::ShouldBlockNavigation(bool for_redirect) {
NavigationHandleImpl* handle_impl = NavigationRequest* request = NavigationRequest::From(navigation_handle());
static_cast<NavigationHandleImpl*>(navigation_handle()); FrameTreeNode* node = request->frame_tree_node();
FrameTreeNode* node = handle_impl->frame_tree_node();
// Find the parent node where mixed content is characterized, if any. // Find the parent node where mixed content is characterized, if any.
FrameTreeNode* mixed_content_node = FrameTreeNode* mixed_content_node =
InWhichFrameIsContentMixed(node, handle_impl->GetURL()); InWhichFrameIsContentMixed(node, request->GetURL());
if (!mixed_content_node) { if (!mixed_content_node) {
MaybeSendBlinkFeatureUsageReport(); MaybeSendBlinkFeatureUsageReport();
return false; return false;
...@@ -150,8 +151,8 @@ bool MixedContentNavigationThrottle::ShouldBlockNavigation(bool for_redirect) { ...@@ -150,8 +151,8 @@ bool MixedContentNavigationThrottle::ShouldBlockNavigation(bool for_redirect) {
// From this point on we know this is not a main frame navigation and that // From this point on we know this is not a main frame navigation and that
// there is mixed content. Now let's decide if it's OK to proceed with it. // there is mixed content. Now let's decide if it's OK to proceed with it.
ReportBasicMixedContentFeatures(handle_impl->request_context_type(), ReportBasicMixedContentFeatures(request->request_context_type(),
handle_impl->mixed_content_context_type()); request->mixed_content_context_type());
// If we're in strict mode, we'll automagically fail everything, and // If we're in strict mode, we'll automagically fail everything, and
// intentionally skip the client/embedder checks in order to prevent degrading // intentionally skip the client/embedder checks in order to prevent degrading
...@@ -166,11 +167,12 @@ bool MixedContentNavigationThrottle::ShouldBlockNavigation(bool for_redirect) { ...@@ -166,11 +167,12 @@ bool MixedContentNavigationThrottle::ShouldBlockNavigation(bool for_redirect) {
prefs.strict_mixed_content_checking || block_all_mixed_content; prefs.strict_mixed_content_checking || block_all_mixed_content;
blink::WebMixedContentContextType mixed_context_type = blink::WebMixedContentContextType mixed_context_type =
handle_impl->mixed_content_context_type(); request->mixed_content_context_type();
if (!ShouldTreatURLSchemeAsCorsEnabled(handle_impl->GetURL())) if (!ShouldTreatURLSchemeAsCorsEnabled(request->GetURL())) {
mixed_context_type = mixed_context_type =
blink::WebMixedContentContextType::kOptionallyBlockable; blink::WebMixedContentContextType::kOptionallyBlockable;
}
bool allowed = false; bool allowed = false;
RenderFrameHostDelegate* frame_host_delegate = RenderFrameHostDelegate* frame_host_delegate =
...@@ -179,7 +181,7 @@ bool MixedContentNavigationThrottle::ShouldBlockNavigation(bool for_redirect) { ...@@ -179,7 +181,7 @@ bool MixedContentNavigationThrottle::ShouldBlockNavigation(bool for_redirect) {
case blink::WebMixedContentContextType::kOptionallyBlockable: case blink::WebMixedContentContextType::kOptionallyBlockable:
allowed = !strict_mode; allowed = !strict_mode;
if (allowed) { if (allowed) {
frame_host_delegate->PassiveInsecureContentFound(handle_impl->GetURL()); frame_host_delegate->PassiveInsecureContentFound(request->GetURL());
frame_host_delegate->DidDisplayInsecureContent(); frame_host_delegate->DidDisplayInsecureContent();
} }
break; break;
...@@ -193,16 +195,15 @@ bool MixedContentNavigationThrottle::ShouldBlockNavigation(bool for_redirect) { ...@@ -193,16 +195,15 @@ bool MixedContentNavigationThrottle::ShouldBlockNavigation(bool for_redirect) {
bool should_ask_delegate = bool should_ask_delegate =
!strict_mode && (!prefs.strictly_block_blockable_mixed_content || !strict_mode && (!prefs.strictly_block_blockable_mixed_content ||
prefs.allow_running_insecure_content); prefs.allow_running_insecure_content);
allowed = allowed = should_ask_delegate &&
should_ask_delegate && frame_host_delegate->ShouldAllowRunningInsecureContent(
frame_host_delegate->ShouldAllowRunningInsecureContent( navigation_handle()->GetWebContents(),
handle_impl->GetWebContents(), prefs.allow_running_insecure_content,
prefs.allow_running_insecure_content, mixed_content_node->current_origin(), request->GetURL());
mixed_content_node->current_origin(), handle_impl->GetURL());
if (allowed) { if (allowed) {
const GURL& origin_url = mixed_content_node->current_origin().GetURL(); const GURL& origin_url = mixed_content_node->current_origin().GetURL();
frame_host_delegate->DidRunInsecureContent(origin_url, frame_host_delegate->DidRunInsecureContent(origin_url,
handle_impl->GetURL()); request->GetURL());
GetContentClient()->browser()->RecordURLMetric( GetContentClient()->browser()->RecordURLMetric(
"ContentSettings.MixedScript.RanMixedScript", origin_url); "ContentSettings.MixedScript.RanMixedScript", origin_url);
mixed_content_features_.insert( mixed_content_features_.insert(
...@@ -222,8 +223,8 @@ bool MixedContentNavigationThrottle::ShouldBlockNavigation(bool for_redirect) { ...@@ -222,8 +223,8 @@ bool MixedContentNavigationThrottle::ShouldBlockNavigation(bool for_redirect) {
break; break;
}; };
UpdateRendererOnMixedContentFound( UpdateRendererOnMixedContentFound(request, mixed_content_node->current_url(),
handle_impl, mixed_content_node->current_url(), allowed, for_redirect); allowed, for_redirect);
MaybeSendBlinkFeatureUsageReport(); MaybeSendBlinkFeatureUsageReport();
return !allowed; return !allowed;
...@@ -287,9 +288,8 @@ FrameTreeNode* MixedContentNavigationThrottle::InWhichFrameIsContentMixed( ...@@ -287,9 +288,8 @@ FrameTreeNode* MixedContentNavigationThrottle::InWhichFrameIsContentMixed(
void MixedContentNavigationThrottle::MaybeSendBlinkFeatureUsageReport() { void MixedContentNavigationThrottle::MaybeSendBlinkFeatureUsageReport() {
if (!mixed_content_features_.empty()) { if (!mixed_content_features_.empty()) {
NavigationHandleImpl* handle_impl = NavigationRequest* request = NavigationRequest::From(navigation_handle());
static_cast<NavigationHandleImpl*>(navigation_handle()); RenderFrameHost* rfh = request->frame_tree_node()->current_frame_host();
RenderFrameHost* rfh = handle_impl->frame_tree_node()->current_frame_host();
rfh->Send(new FrameMsg_BlinkFeatureUsageReport(rfh->GetRoutingID(), rfh->Send(new FrameMsg_BlinkFeatureUsageReport(rfh->GetRoutingID(),
mixed_content_features_)); mixed_content_features_));
mixed_content_features_.clear(); mixed_content_features_.clear();
......
...@@ -119,13 +119,7 @@ class CONTENT_EXPORT NavigationHandleImpl : public NavigationHandle { ...@@ -119,13 +119,7 @@ class CONTENT_EXPORT NavigationHandleImpl : public NavigationHandle {
mojom::TransferrableURLLoaderPtr transferrable_loader) override; mojom::TransferrableURLLoaderPtr transferrable_loader) override;
blink::mojom::RequestContextType request_context_type() const { blink::mojom::RequestContextType request_context_type() const {
DCHECK_GE(state(), NavigationRequest::PROCESSING_WILL_START_REQUEST); return navigation_request_->request_context_type();
return navigation_request_->begin_params()->request_context_type;
}
blink::WebMixedContentContextType mixed_content_context_type() const {
DCHECK_GE(state(), NavigationRequest::PROCESSING_WILL_START_REQUEST);
return navigation_request_->begin_params()->mixed_content_context_type;
} }
// Get the unique id from the NavigationEntry associated with this // Get the unique id from the NavigationEntry associated with this
......
...@@ -480,6 +480,16 @@ class CONTENT_EXPORT NavigationRequest : public NavigationURLLoaderDelegate, ...@@ -480,6 +480,16 @@ class CONTENT_EXPORT NavigationRequest : public NavigationURLLoaderDelegate,
// expose the NavigationHandle when navigating to an InterstitialPage. // expose the NavigationHandle when navigating to an InterstitialPage.
NavigatorDelegate* GetDelegate() const; NavigatorDelegate* GetDelegate() const;
blink::mojom::RequestContextType request_context_type() const {
DCHECK_GE(handle_state_, PROCESSING_WILL_START_REQUEST);
return begin_params_->request_context_type;
}
blink::WebMixedContentContextType mixed_content_context_type() const {
DCHECK_GE(handle_state_, PROCESSING_WILL_START_REQUEST);
return begin_params_->mixed_content_context_type;
}
private: private:
friend class NavigationRequestTest; friend class NavigationRequestTest;
......
...@@ -10,7 +10,6 @@ ...@@ -10,7 +10,6 @@
#include "base/task/post_task.h" #include "base/task/post_task.h"
#include "base/test/metrics/histogram_tester.h" #include "base/test/metrics/histogram_tester.h"
#include "content/browser/frame_host/debug_urls.h" #include "content/browser/frame_host/debug_urls.h"
#include "content/browser/frame_host/navigation_handle_impl.h"
#include "content/browser/frame_host/navigation_request.h" #include "content/browser/frame_host/navigation_request.h"
#include "content/browser/site_instance_impl.h" #include "content/browser/site_instance_impl.h"
#include "content/browser/web_contents/web_contents_impl.h" #include "content/browser/web_contents/web_contents_impl.h"
...@@ -95,41 +94,38 @@ class TestNavigationThrottle : public NavigationThrottle { ...@@ -95,41 +94,38 @@ class TestNavigationThrottle : public NavigationThrottle {
private: private:
// NavigationThrottle implementation. // NavigationThrottle implementation.
NavigationThrottle::ThrottleCheckResult WillStartRequest() override { NavigationThrottle::ThrottleCheckResult WillStartRequest() override {
NavigationHandleImpl* navigation_handle_impl = NavigationRequest* navigation_request =
static_cast<NavigationHandleImpl*>(navigation_handle()); NavigationRequest::From(navigation_handle());
CHECK_NE(blink::mojom::RequestContextType::UNSPECIFIED, CHECK_NE(blink::mojom::RequestContextType::UNSPECIFIED,
navigation_handle_impl->request_context_type()); navigation_request->request_context_type());
request_context_type_ = navigation_handle_impl->request_context_type(); request_context_type_ = navigation_request->request_context_type();
base::PostTask(FROM_HERE, {BrowserThread::UI}, did_call_will_start_); base::PostTask(FROM_HERE, {BrowserThread::UI}, did_call_will_start_);
return will_start_result_; return will_start_result_;
} }
NavigationThrottle::ThrottleCheckResult WillRedirectRequest() override { NavigationThrottle::ThrottleCheckResult WillRedirectRequest() override {
NavigationHandleImpl* navigation_handle_impl = NavigationRequest* navigation_request =
static_cast<NavigationHandleImpl*>(navigation_handle()); NavigationRequest::From(navigation_handle());
CHECK_EQ(request_context_type_, CHECK_EQ(request_context_type_, navigation_request->request_context_type());
navigation_handle_impl->request_context_type());
base::PostTask(FROM_HERE, {BrowserThread::UI}, did_call_will_redirect_); base::PostTask(FROM_HERE, {BrowserThread::UI}, did_call_will_redirect_);
return will_redirect_result_; return will_redirect_result_;
} }
NavigationThrottle::ThrottleCheckResult WillFailRequest() override { NavigationThrottle::ThrottleCheckResult WillFailRequest() override {
NavigationHandleImpl* navigation_handle_impl = NavigationRequest* navigation_request =
static_cast<NavigationHandleImpl*>(navigation_handle()); NavigationRequest::From(navigation_handle());
CHECK_EQ(request_context_type_, CHECK_EQ(request_context_type_, navigation_request->request_context_type());
navigation_handle_impl->request_context_type());
base::PostTask(FROM_HERE, {BrowserThread::UI}, did_call_will_fail_); base::PostTask(FROM_HERE, {BrowserThread::UI}, did_call_will_fail_);
return will_fail_result_; return will_fail_result_;
} }
NavigationThrottle::ThrottleCheckResult WillProcessResponse() override { NavigationThrottle::ThrottleCheckResult WillProcessResponse() override {
NavigationHandleImpl* navigation_handle_impl = NavigationRequest* navigation_request =
static_cast<NavigationHandleImpl*>(navigation_handle()); NavigationRequest::From(navigation_handle());
CHECK_EQ(request_context_type_, CHECK_EQ(request_context_type_, navigation_request->request_context_type());
navigation_handle_impl->request_context_type());
base::PostTask(FROM_HERE, {BrowserThread::UI}, did_call_will_process_); base::PostTask(FROM_HERE, {BrowserThread::UI}, did_call_will_process_);
return will_process_result_; return will_process_result_;
...@@ -433,7 +429,7 @@ void ExpectChildFrameCollapsed(Shell* shell, ...@@ -433,7 +429,7 @@ void ExpectChildFrameCollapsed(Shell* shell,
} // namespace } // namespace
class NavigationHandleImplBrowserTest : public ContentBrowserTest { class NavigationRequestBrowserTest : public ContentBrowserTest {
protected: protected:
void SetUpOnMainThread() override { void SetUpOnMainThread() override {
host_resolver()->AddRule("*", "127.0.0.1"); host_resolver()->AddRule("*", "127.0.0.1");
...@@ -473,11 +469,11 @@ class NavigationHandleImplBrowserTest : public ContentBrowserTest { ...@@ -473,11 +469,11 @@ class NavigationHandleImplBrowserTest : public ContentBrowserTest {
} }
}; };
class NavigationHandleImplDownloadBrowserTest class NavigationRequestDownloadBrowserTest
: public NavigationHandleImplBrowserTest { : public NavigationRequestBrowserTest {
protected: protected:
void SetUpOnMainThread() override { void SetUpOnMainThread() override {
NavigationHandleImplBrowserTest::SetUpOnMainThread(); NavigationRequestBrowserTest::SetUpOnMainThread();
// Set up a test download directory, in order to prevent prompting for // Set up a test download directory, in order to prevent prompting for
// handling downloads. // handling downloads.
...@@ -496,7 +492,7 @@ class NavigationHandleImplDownloadBrowserTest ...@@ -496,7 +492,7 @@ class NavigationHandleImplDownloadBrowserTest
}; };
// Ensure that PageTransition is properly set on the NavigationHandle. // Ensure that PageTransition is properly set on the NavigationHandle.
IN_PROC_BROWSER_TEST_F(NavigationHandleImplBrowserTest, VerifyPageTransition) { IN_PROC_BROWSER_TEST_F(NavigationRequestBrowserTest, VerifyPageTransition) {
{ {
// Test browser initiated navigation, which should have a PageTransition as // Test browser initiated navigation, which should have a PageTransition as
// if it came from the omnibox. // if it came from the omnibox.
...@@ -540,7 +536,7 @@ IN_PROC_BROWSER_TEST_F(NavigationHandleImplBrowserTest, VerifyPageTransition) { ...@@ -540,7 +536,7 @@ IN_PROC_BROWSER_TEST_F(NavigationHandleImplBrowserTest, VerifyPageTransition) {
// Ensure that the following methods on NavigationHandle behave correctly: // Ensure that the following methods on NavigationHandle behave correctly:
// * IsInMainFrame // * IsInMainFrame
// * IsParentMainFrame // * IsParentMainFrame
IN_PROC_BROWSER_TEST_F(NavigationHandleImplBrowserTest, VerifyFrameTree) { IN_PROC_BROWSER_TEST_F(NavigationRequestBrowserTest, VerifyFrameTree) {
GURL main_url(embedded_test_server()->GetURL( GURL main_url(embedded_test_server()->GetURL(
"a.com", "/cross_site_iframe_factory.html?a(b(c))")); "a.com", "/cross_site_iframe_factory.html?a(b(c))"));
GURL b_url(embedded_test_server()->GetURL( GURL b_url(embedded_test_server()->GetURL(
...@@ -585,7 +581,7 @@ IN_PROC_BROWSER_TEST_F(NavigationHandleImplBrowserTest, VerifyFrameTree) { ...@@ -585,7 +581,7 @@ IN_PROC_BROWSER_TEST_F(NavigationHandleImplBrowserTest, VerifyFrameTree) {
} }
// Ensure that the WasRedirected() method on NavigationHandle behaves correctly. // Ensure that the WasRedirected() method on NavigationHandle behaves correctly.
IN_PROC_BROWSER_TEST_F(NavigationHandleImplBrowserTest, VerifyRedirect) { IN_PROC_BROWSER_TEST_F(NavigationRequestBrowserTest, VerifyRedirect) {
{ {
GURL url(embedded_test_server()->GetURL("/title1.html")); GURL url(embedded_test_server()->GetURL("/title1.html"));
NavigationHandleObserver observer(shell()->web_contents(), url); NavigationHandleObserver observer(shell()->web_contents(), url);
...@@ -613,8 +609,7 @@ IN_PROC_BROWSER_TEST_F(NavigationHandleImplBrowserTest, VerifyRedirect) { ...@@ -613,8 +609,7 @@ IN_PROC_BROWSER_TEST_F(NavigationHandleImplBrowserTest, VerifyRedirect) {
// Ensure that a certificate error results in a committed navigation with // Ensure that a certificate error results in a committed navigation with
// the appropriate error code on the handle. // the appropriate error code on the handle.
IN_PROC_BROWSER_TEST_F(NavigationHandleImplBrowserTest, IN_PROC_BROWSER_TEST_F(NavigationRequestBrowserTest, VerifyCertErrorFailure) {
VerifyCertErrorFailure) {
net::EmbeddedTestServer https_server(net::EmbeddedTestServer::TYPE_HTTPS); net::EmbeddedTestServer https_server(net::EmbeddedTestServer::TYPE_HTTPS);
https_server.SetSSLConfig(net::EmbeddedTestServer::CERT_MISMATCHED_NAME); https_server.SetSSLConfig(net::EmbeddedTestServer::CERT_MISMATCHED_NAME);
ASSERT_TRUE(https_server.Start()); ASSERT_TRUE(https_server.Start());
...@@ -631,8 +626,7 @@ IN_PROC_BROWSER_TEST_F(NavigationHandleImplBrowserTest, ...@@ -631,8 +626,7 @@ IN_PROC_BROWSER_TEST_F(NavigationHandleImplBrowserTest,
// Ensure that the IsRendererInitiated() method on NavigationHandle behaves // Ensure that the IsRendererInitiated() method on NavigationHandle behaves
// correctly. // correctly.
IN_PROC_BROWSER_TEST_F(NavigationHandleImplBrowserTest, IN_PROC_BROWSER_TEST_F(NavigationRequestBrowserTest, VerifyRendererInitiated) {
VerifyRendererInitiated) {
{ {
// Test browser initiated navigation. // Test browser initiated navigation.
GURL url(embedded_test_server()->GetURL("/title1.html")); GURL url(embedded_test_server()->GetURL("/title1.html"));
...@@ -698,7 +692,7 @@ IN_PROC_BROWSER_TEST_F(NavigationHandleImplBrowserTest, ...@@ -698,7 +692,7 @@ IN_PROC_BROWSER_TEST_F(NavigationHandleImplBrowserTest,
// Ensure that methods on NavigationHandle behave correctly with an iframe that // Ensure that methods on NavigationHandle behave correctly with an iframe that
// navigates to its srcdoc attribute. // navigates to its srcdoc attribute.
IN_PROC_BROWSER_TEST_F(NavigationHandleImplBrowserTest, VerifySrcdoc) { IN_PROC_BROWSER_TEST_F(NavigationRequestBrowserTest, VerifySrcdoc) {
GURL url(embedded_test_server()->GetURL( GURL url(embedded_test_server()->GetURL(
"/frame_tree/page_with_srcdoc_frame.html")); "/frame_tree/page_with_srcdoc_frame.html"));
NavigationHandleObserver observer(shell()->web_contents(), NavigationHandleObserver observer(shell()->web_contents(),
...@@ -713,7 +707,7 @@ IN_PROC_BROWSER_TEST_F(NavigationHandleImplBrowserTest, VerifySrcdoc) { ...@@ -713,7 +707,7 @@ IN_PROC_BROWSER_TEST_F(NavigationHandleImplBrowserTest, VerifySrcdoc) {
// Ensure that the IsSameDocument() method on NavigationHandle behaves // Ensure that the IsSameDocument() method on NavigationHandle behaves
// correctly. // correctly.
IN_PROC_BROWSER_TEST_F(NavigationHandleImplBrowserTest, VerifySameDocument) { IN_PROC_BROWSER_TEST_F(NavigationRequestBrowserTest, VerifySameDocument) {
GURL url(embedded_test_server()->GetURL( GURL url(embedded_test_server()->GetURL(
"a.com", "/cross_site_iframe_factory.html?a(a())")); "a.com", "/cross_site_iframe_factory.html?a(a())"));
EXPECT_TRUE(NavigateToURL(shell(), url)); EXPECT_TRUE(NavigateToURL(shell(), url));
...@@ -779,7 +773,7 @@ IN_PROC_BROWSER_TEST_F(NavigationHandleImplBrowserTest, VerifySameDocument) { ...@@ -779,7 +773,7 @@ IN_PROC_BROWSER_TEST_F(NavigationHandleImplBrowserTest, VerifySameDocument) {
// Ensure that a NavigationThrottle can cancel the navigation at navigation // Ensure that a NavigationThrottle can cancel the navigation at navigation
// start. // start.
IN_PROC_BROWSER_TEST_F(NavigationHandleImplBrowserTest, ThrottleCancelStart) { IN_PROC_BROWSER_TEST_F(NavigationRequestBrowserTest, ThrottleCancelStart) {
GURL start_url(embedded_test_server()->GetURL("/title1.html")); GURL start_url(embedded_test_server()->GetURL("/title1.html"));
EXPECT_TRUE(NavigateToURL(shell(), start_url)); EXPECT_TRUE(NavigateToURL(shell(), start_url));
...@@ -803,8 +797,7 @@ IN_PROC_BROWSER_TEST_F(NavigationHandleImplBrowserTest, ThrottleCancelStart) { ...@@ -803,8 +797,7 @@ IN_PROC_BROWSER_TEST_F(NavigationHandleImplBrowserTest, ThrottleCancelStart) {
// Ensure that a NavigationThrottle can cancel the navigation when a navigation // Ensure that a NavigationThrottle can cancel the navigation when a navigation
// is redirected. // is redirected.
IN_PROC_BROWSER_TEST_F(NavigationHandleImplBrowserTest, IN_PROC_BROWSER_TEST_F(NavigationRequestBrowserTest, ThrottleCancelRedirect) {
ThrottleCancelRedirect) {
GURL start_url(embedded_test_server()->GetURL("/title1.html")); GURL start_url(embedded_test_server()->GetURL("/title1.html"));
EXPECT_TRUE(NavigateToURL(shell(), start_url)); EXPECT_TRUE(NavigateToURL(shell(), start_url));
...@@ -845,7 +838,7 @@ IN_PROC_BROWSER_TEST_F(NavigationHandleImplBrowserTest, ...@@ -845,7 +838,7 @@ IN_PROC_BROWSER_TEST_F(NavigationHandleImplBrowserTest,
} }
// Ensure that a NavigationThrottle can respond CANCEL when a navigation fails. // Ensure that a NavigationThrottle can respond CANCEL when a navigation fails.
IN_PROC_BROWSER_TEST_F(NavigationHandleImplBrowserTest, ThrottleCancelFailure) { IN_PROC_BROWSER_TEST_F(NavigationRequestBrowserTest, ThrottleCancelFailure) {
net::EmbeddedTestServer https_server(net::EmbeddedTestServer::TYPE_HTTPS); net::EmbeddedTestServer https_server(net::EmbeddedTestServer::TYPE_HTTPS);
https_server.SetSSLConfig(net::EmbeddedTestServer::CERT_MISMATCHED_NAME); https_server.SetSSLConfig(net::EmbeddedTestServer::CERT_MISMATCHED_NAME);
ASSERT_TRUE(https_server.Start()); ASSERT_TRUE(https_server.Start());
...@@ -916,8 +909,7 @@ IN_PROC_BROWSER_TEST_F(NavigationHandleImplBrowserTest, ThrottleCancelFailure) { ...@@ -916,8 +909,7 @@ IN_PROC_BROWSER_TEST_F(NavigationHandleImplBrowserTest, ThrottleCancelFailure) {
// Ensure that a NavigationThrottle can cancel the navigation when the response // Ensure that a NavigationThrottle can cancel the navigation when the response
// is received. // is received.
IN_PROC_BROWSER_TEST_F(NavigationHandleImplBrowserTest, IN_PROC_BROWSER_TEST_F(NavigationRequestBrowserTest, ThrottleCancelResponse) {
ThrottleCancelResponse) {
GURL start_url(embedded_test_server()->GetURL("/title1.html")); GURL start_url(embedded_test_server()->GetURL("/title1.html"));
EXPECT_TRUE(NavigateToURL(shell(), start_url)); EXPECT_TRUE(NavigateToURL(shell(), start_url));
...@@ -941,7 +933,7 @@ IN_PROC_BROWSER_TEST_F(NavigationHandleImplBrowserTest, ...@@ -941,7 +933,7 @@ IN_PROC_BROWSER_TEST_F(NavigationHandleImplBrowserTest,
// Ensure that a NavigationThrottle can defer and resume the navigation at // Ensure that a NavigationThrottle can defer and resume the navigation at
// navigation start, navigation redirect and response received. // navigation start, navigation redirect and response received.
IN_PROC_BROWSER_TEST_F(NavigationHandleImplBrowserTest, ThrottleDefer) { IN_PROC_BROWSER_TEST_F(NavigationRequestBrowserTest, ThrottleDefer) {
GURL start_url(embedded_test_server()->GetURL("/title1.html")); GURL start_url(embedded_test_server()->GetURL("/title1.html"));
EXPECT_TRUE(NavigateToURL(shell(), start_url)); EXPECT_TRUE(NavigateToURL(shell(), start_url));
...@@ -992,7 +984,7 @@ IN_PROC_BROWSER_TEST_F(NavigationHandleImplBrowserTest, ThrottleDefer) { ...@@ -992,7 +984,7 @@ IN_PROC_BROWSER_TEST_F(NavigationHandleImplBrowserTest, ThrottleDefer) {
// Ensure that a NavigationThrottle can defer and resume the navigation at // Ensure that a NavigationThrottle can defer and resume the navigation at
// navigation start and navigation failure. // navigation start and navigation failure.
IN_PROC_BROWSER_TEST_F(NavigationHandleImplBrowserTest, ThrottleDeferFailure) { IN_PROC_BROWSER_TEST_F(NavigationRequestBrowserTest, ThrottleDeferFailure) {
net::EmbeddedTestServer https_server(net::EmbeddedTestServer::TYPE_HTTPS); net::EmbeddedTestServer https_server(net::EmbeddedTestServer::TYPE_HTTPS);
https_server.SetSSLConfig(net::EmbeddedTestServer::CERT_MISMATCHED_NAME); https_server.SetSSLConfig(net::EmbeddedTestServer::CERT_MISMATCHED_NAME);
ASSERT_TRUE(https_server.Start()); ASSERT_TRUE(https_server.Start());
...@@ -1034,8 +1026,7 @@ IN_PROC_BROWSER_TEST_F(NavigationHandleImplBrowserTest, ThrottleDeferFailure) { ...@@ -1034,8 +1026,7 @@ IN_PROC_BROWSER_TEST_F(NavigationHandleImplBrowserTest, ThrottleDeferFailure) {
// Ensure that a NavigationThrottle can block the navigation and collapse the // Ensure that a NavigationThrottle can block the navigation and collapse the
// frame owner both on request start as well as after a redirect. Plus, ensure // frame owner both on request start as well as after a redirect. Plus, ensure
// that the frame is restored on the subsequent non-error-page navigation. // that the frame is restored on the subsequent non-error-page navigation.
IN_PROC_BROWSER_TEST_F(NavigationHandleImplBrowserTest, IN_PROC_BROWSER_TEST_F(NavigationRequestBrowserTest, ThrottleBlockAndCollapse) {
ThrottleBlockAndCollapse) {
const char kChildFrameId[] = "child0"; const char kChildFrameId[] = "child0";
GURL main_url(embedded_test_server()->GetURL( GURL main_url(embedded_test_server()->GetURL(
"a.com", "/frame_tree/page_with_one_frame.html")); "a.com", "/frame_tree/page_with_one_frame.html"));
...@@ -1130,7 +1121,7 @@ IN_PROC_BROWSER_TEST_F(NavigationHandleImplBrowserTest, ...@@ -1130,7 +1121,7 @@ IN_PROC_BROWSER_TEST_F(NavigationHandleImplBrowserTest,
// BLOCK_REQUEST_AND_COLLAPSE should block the navigation in legacy <frame>'s, // BLOCK_REQUEST_AND_COLLAPSE should block the navigation in legacy <frame>'s,
// but should not collapse the <frame> element itself for legacy reasons. // but should not collapse the <frame> element itself for legacy reasons.
IN_PROC_BROWSER_TEST_F(NavigationHandleImplBrowserTest, IN_PROC_BROWSER_TEST_F(NavigationRequestBrowserTest,
ThrottleBlockAndCollapse_LegacyFrameNotCollapsed) { ThrottleBlockAndCollapse_LegacyFrameNotCollapsed) {
const char kChildFrameId[] = "child0"; const char kChildFrameId[] = "child0";
GURL main_url(embedded_test_server()->GetURL( GURL main_url(embedded_test_server()->GetURL(
...@@ -1175,7 +1166,7 @@ IN_PROC_BROWSER_TEST_F(NavigationHandleImplBrowserTest, ...@@ -1175,7 +1166,7 @@ IN_PROC_BROWSER_TEST_F(NavigationHandleImplBrowserTest,
} }
// Checks that the RequestContextType value is properly set. // Checks that the RequestContextType value is properly set.
IN_PROC_BROWSER_TEST_F(NavigationHandleImplBrowserTest, IN_PROC_BROWSER_TEST_F(NavigationRequestBrowserTest,
VerifyRequestContextTypeForFrameTree) { VerifyRequestContextTypeForFrameTree) {
GURL main_url(embedded_test_server()->GetURL( GURL main_url(embedded_test_server()->GetURL(
"a.com", "/cross_site_iframe_factory.html?a(b(c))")); "a.com", "/cross_site_iframe_factory.html?a(b(c))"));
...@@ -1231,7 +1222,7 @@ IN_PROC_BROWSER_TEST_F(NavigationHandleImplBrowserTest, ...@@ -1231,7 +1222,7 @@ IN_PROC_BROWSER_TEST_F(NavigationHandleImplBrowserTest,
} }
// Checks that the RequestContextType value is properly set for an hyper-link. // Checks that the RequestContextType value is properly set for an hyper-link.
IN_PROC_BROWSER_TEST_F(NavigationHandleImplBrowserTest, IN_PROC_BROWSER_TEST_F(NavigationRequestBrowserTest,
VerifyHyperlinkRequestContextType) { VerifyHyperlinkRequestContextType) {
GURL link_url(embedded_test_server()->GetURL("/title2.html")); GURL link_url(embedded_test_server()->GetURL("/title2.html"));
GURL document_url(embedded_test_server()->GetURL("/simple_links.html")); GURL document_url(embedded_test_server()->GetURL("/simple_links.html"));
...@@ -1267,7 +1258,7 @@ IN_PROC_BROWSER_TEST_F(NavigationHandleImplBrowserTest, ...@@ -1267,7 +1258,7 @@ IN_PROC_BROWSER_TEST_F(NavigationHandleImplBrowserTest,
} }
// Checks that the RequestContextType value is properly set for an form (POST). // Checks that the RequestContextType value is properly set for an form (POST).
IN_PROC_BROWSER_TEST_F(NavigationHandleImplBrowserTest, IN_PROC_BROWSER_TEST_F(NavigationRequestBrowserTest,
VerifyFormRequestContextType) { VerifyFormRequestContextType) {
GURL document_url( GURL document_url(
embedded_test_server()->GetURL("/session_history/form.html")); embedded_test_server()->GetURL("/session_history/form.html"));
...@@ -1302,7 +1293,7 @@ IN_PROC_BROWSER_TEST_F(NavigationHandleImplBrowserTest, ...@@ -1302,7 +1293,7 @@ IN_PROC_BROWSER_TEST_F(NavigationHandleImplBrowserTest,
// Checks that the error code is properly set on the NavigationHandle when a // Checks that the error code is properly set on the NavigationHandle when a
// NavigationThrottle cancels. // NavigationThrottle cancels.
IN_PROC_BROWSER_TEST_F(NavigationHandleImplBrowserTest, IN_PROC_BROWSER_TEST_F(NavigationRequestBrowserTest,
ErrorCodeOnThrottleCancelNavigation) { ErrorCodeOnThrottleCancelNavigation) {
const GURL kUrl = embedded_test_server()->GetURL("/title1.html"); const GURL kUrl = embedded_test_server()->GetURL("/title1.html");
const GURL kRedirectingUrl = const GURL kRedirectingUrl =
...@@ -1382,9 +1373,9 @@ IN_PROC_BROWSER_TEST_F(NavigationHandleImplBrowserTest, ...@@ -1382,9 +1373,9 @@ IN_PROC_BROWSER_TEST_F(NavigationHandleImplBrowserTest,
EXPECT_EQ(net::ERR_BLOCKED_BY_CLIENT, observer.net_error_code()); EXPECT_EQ(net::ERR_BLOCKED_BY_CLIENT, observer.net_error_code());
} }
// Checks that there's no UAF if NavigationHandleImpl::WillStartRequest cancels // Checks that there's no UAF if NavigationRequest::WillStartRequest cancels the
// the navigation. // navigation.
IN_PROC_BROWSER_TEST_F(NavigationHandleImplBrowserTest, IN_PROC_BROWSER_TEST_F(NavigationRequestBrowserTest,
CancelNavigationInWillStartRequest) { CancelNavigationInWillStartRequest) {
const GURL kUrl1 = embedded_test_server()->GetURL("/title1.html"); const GURL kUrl1 = embedded_test_server()->GetURL("/title1.html");
const GURL kUrl2 = embedded_test_server()->GetURL("/title2.html"); const GURL kUrl2 = embedded_test_server()->GetURL("/title2.html");
...@@ -1395,7 +1386,7 @@ IN_PROC_BROWSER_TEST_F(NavigationHandleImplBrowserTest, ...@@ -1395,7 +1386,7 @@ IN_PROC_BROWSER_TEST_F(NavigationHandleImplBrowserTest,
// To take the path that doesn't run beforeunload, so that // To take the path that doesn't run beforeunload, so that
// NavigationControllerImpl::NavigateToPendingEntry is on the botttom of the // NavigationControllerImpl::NavigateToPendingEntry is on the botttom of the
// stack when NavigationHandleImpl::WillStartRequest is called. // stack when NavigationRequest::WillStartRequest is called.
CrashTab(shell()->web_contents()); CrashTab(shell()->web_contents());
// Set up a NavigationThrottle that will cancel the navigation in // Set up a NavigationThrottle that will cancel the navigation in
...@@ -1411,7 +1402,7 @@ IN_PROC_BROWSER_TEST_F(NavigationHandleImplBrowserTest, ...@@ -1411,7 +1402,7 @@ IN_PROC_BROWSER_TEST_F(NavigationHandleImplBrowserTest,
// Verify that a cross-process navigation in a frame for which the current // Verify that a cross-process navigation in a frame for which the current
// renderer process is not live will not result in leaking a // renderer process is not live will not result in leaking a
// RenderProcessHost. See https://crbug.com/949977. // RenderProcessHost. See https://crbug.com/949977.
IN_PROC_BROWSER_TEST_F(NavigationHandleImplBrowserTest, IN_PROC_BROWSER_TEST_F(NavigationRequestBrowserTest,
NoLeakFromStartingSiteInstance) { NoLeakFromStartingSiteInstance) {
GURL url_a = embedded_test_server()->GetURL("a.com", "/title1.html"); GURL url_a = embedded_test_server()->GetURL("a.com", "/title1.html");
EXPECT_TRUE(NavigateToURL(shell(), url_a)); EXPECT_TRUE(NavigateToURL(shell(), url_a));
...@@ -1490,8 +1481,8 @@ IN_PROC_BROWSER_TEST_F(NavigationHandleImplBrowserTest, ...@@ -1490,8 +1481,8 @@ IN_PROC_BROWSER_TEST_F(NavigationHandleImplBrowserTest,
// Specialized test that verifies the NavigationHandle gets the HTTPS upgraded // Specialized test that verifies the NavigationHandle gets the HTTPS upgraded
// URL from the very beginning of the navigation. // URL from the very beginning of the navigation.
class NavigationHandleImplHttpsUpgradeBrowserTest class NavigationRequestHttpsUpgradeBrowserTest
: public NavigationHandleImplBrowserTest { : public NavigationRequestBrowserTest {
public: public:
void CheckHttpsUpgradedIframeNavigation(const GURL& start_url, void CheckHttpsUpgradedIframeNavigation(const GURL& start_url,
const GURL& iframe_secure_url) { const GURL& iframe_secure_url) {
...@@ -1527,7 +1518,7 @@ class NavigationHandleImplHttpsUpgradeBrowserTest ...@@ -1527,7 +1518,7 @@ class NavigationHandleImplHttpsUpgradeBrowserTest
}; };
// Tests that the start URL is HTTPS upgraded for a same site navigation. // Tests that the start URL is HTTPS upgraded for a same site navigation.
IN_PROC_BROWSER_TEST_F(NavigationHandleImplHttpsUpgradeBrowserTest, IN_PROC_BROWSER_TEST_F(NavigationRequestHttpsUpgradeBrowserTest,
StartUrlIsHttpsUpgradedSameSite) { StartUrlIsHttpsUpgradedSameSite) {
GURL start_url(embedded_test_server()->GetURL( GURL start_url(embedded_test_server()->GetURL(
"example.com", "/https_upgrade_same_site.html")); "example.com", "/https_upgrade_same_site.html"));
...@@ -1544,7 +1535,7 @@ IN_PROC_BROWSER_TEST_F(NavigationHandleImplHttpsUpgradeBrowserTest, ...@@ -1544,7 +1535,7 @@ IN_PROC_BROWSER_TEST_F(NavigationHandleImplHttpsUpgradeBrowserTest,
} }
// Tests that the start URL is HTTPS upgraded for a cross site navigation. // Tests that the start URL is HTTPS upgraded for a cross site navigation.
IN_PROC_BROWSER_TEST_F(NavigationHandleImplHttpsUpgradeBrowserTest, IN_PROC_BROWSER_TEST_F(NavigationRequestHttpsUpgradeBrowserTest,
StartUrlIsHttpsUpgradedCrossSite) { StartUrlIsHttpsUpgradedCrossSite) {
GURL start_url( GURL start_url(
embedded_test_server()->GetURL("/https_upgrade_cross_site.html")); embedded_test_server()->GetURL("/https_upgrade_cross_site.html"));
...@@ -1555,7 +1546,7 @@ IN_PROC_BROWSER_TEST_F(NavigationHandleImplHttpsUpgradeBrowserTest, ...@@ -1555,7 +1546,7 @@ IN_PROC_BROWSER_TEST_F(NavigationHandleImplHttpsUpgradeBrowserTest,
// Ensure that browser-initiated same-document navigations are detected and // Ensure that browser-initiated same-document navigations are detected and
// don't issue network requests. See crbug.com/663777. // don't issue network requests. See crbug.com/663777.
IN_PROC_BROWSER_TEST_F(NavigationHandleImplBrowserTest, IN_PROC_BROWSER_TEST_F(NavigationRequestBrowserTest,
SameDocumentBrowserInitiatedNoReload) { SameDocumentBrowserInitiatedNoReload) {
GURL url(embedded_test_server()->GetURL("/title1.html")); GURL url(embedded_test_server()->GetURL("/title1.html"));
GURL url_fragment_1(embedded_test_server()->GetURL("/title1.html#id_1")); GURL url_fragment_1(embedded_test_server()->GetURL("/title1.html#id_1"));
...@@ -1666,7 +1657,7 @@ class NavigationLogger : public WebContentsObserver { ...@@ -1666,7 +1657,7 @@ class NavigationLogger : public WebContentsObserver {
// a NavigationHandle mismatch and a new NavigationHandle creation to commit // a NavigationHandle mismatch and a new NavigationHandle creation to commit
// the error page. This test makes sure that only one NavigationHandle is used // the error page. This test makes sure that only one NavigationHandle is used
// for committing the error page. See https://crbug.com/695421 // for committing the error page. See https://crbug.com/695421
IN_PROC_BROWSER_TEST_F(NavigationHandleImplBrowserTest, BlockedOnRedirect) { IN_PROC_BROWSER_TEST_F(NavigationRequestBrowserTest, BlockedOnRedirect) {
const GURL kUrl = embedded_test_server()->GetURL("/title1.html"); const GURL kUrl = embedded_test_server()->GetURL("/title1.html");
const GURL kRedirectingUrl = const GURL kRedirectingUrl =
embedded_test_server()->GetURL("/server-redirect?" + kUrl.spec()); embedded_test_server()->GetURL("/server-redirect?" + kUrl.spec());
...@@ -1695,14 +1686,13 @@ IN_PROC_BROWSER_TEST_F(NavigationHandleImplBrowserTest, BlockedOnRedirect) { ...@@ -1695,14 +1686,13 @@ IN_PROC_BROWSER_TEST_F(NavigationHandleImplBrowserTest, BlockedOnRedirect) {
// Tests that when a navigation starts while there's an existing one, the first // Tests that when a navigation starts while there's an existing one, the first
// one has the right error code set on its navigation handle. // one has the right error code set on its navigation handle.
IN_PROC_BROWSER_TEST_F(NavigationHandleImplBrowserTest, ErrorCodeOnCancel) { IN_PROC_BROWSER_TEST_F(NavigationRequestBrowserTest, ErrorCodeOnCancel) {
GURL slow_url = embedded_test_server()->GetURL("/slow?60"); GURL slow_url = embedded_test_server()->GetURL("/slow?60");
NavigationHandleObserver observer(shell()->web_contents(), slow_url); NavigationHandleObserver observer(shell()->web_contents(), slow_url);
shell()->LoadURL(slow_url); shell()->LoadURL(slow_url);
GURL url2(embedded_test_server()->GetURL("/title1.html")); GURL url2(embedded_test_server()->GetURL("/title1.html"));
TestNavigationObserver same_tab_observer( TestNavigationObserver same_tab_observer(shell()->web_contents(), 1);
shell()->web_contents(), 1);
shell()->LoadURL(url2); shell()->LoadURL(url2);
same_tab_observer.Wait(); same_tab_observer.Wait();
...@@ -1711,7 +1701,7 @@ IN_PROC_BROWSER_TEST_F(NavigationHandleImplBrowserTest, ErrorCodeOnCancel) { ...@@ -1711,7 +1701,7 @@ IN_PROC_BROWSER_TEST_F(NavigationHandleImplBrowserTest, ErrorCodeOnCancel) {
// Tests that when a renderer-initiated request redirects to a URL that the // Tests that when a renderer-initiated request redirects to a URL that the
// renderer can't access, the right error code is set on the NavigationHandle. // renderer can't access, the right error code is set on the NavigationHandle.
IN_PROC_BROWSER_TEST_F(NavigationHandleImplBrowserTest, ErrorCodeOnRedirect) { IN_PROC_BROWSER_TEST_F(NavigationRequestBrowserTest, ErrorCodeOnRedirect) {
GURL url(embedded_test_server()->GetURL("/title1.html")); GURL url(embedded_test_server()->GetURL("/title1.html"));
EXPECT_TRUE(NavigateToURL(shell(), url)); EXPECT_TRUE(NavigateToURL(shell(), url));
...@@ -1729,7 +1719,7 @@ IN_PROC_BROWSER_TEST_F(NavigationHandleImplBrowserTest, ErrorCodeOnRedirect) { ...@@ -1729,7 +1719,7 @@ IN_PROC_BROWSER_TEST_F(NavigationHandleImplBrowserTest, ErrorCodeOnRedirect) {
// Test to verify that error pages caused by NavigationThrottle blocking a // Test to verify that error pages caused by NavigationThrottle blocking a
// request in the main frame from being made are properly committed in a // request in the main frame from being made are properly committed in a
// separate error page process. // separate error page process.
IN_PROC_BROWSER_TEST_F(NavigationHandleImplBrowserTest, IN_PROC_BROWSER_TEST_F(NavigationRequestBrowserTest,
ErrorPageBlockedNavigation) { ErrorPageBlockedNavigation) {
GURL start_url(embedded_test_server()->GetURL("foo.com", "/title1.html")); GURL start_url(embedded_test_server()->GetURL("foo.com", "/title1.html"));
GURL blocked_url(embedded_test_server()->GetURL("bar.com", "/title2.html")); GURL blocked_url(embedded_test_server()->GetURL("bar.com", "/title2.html"));
...@@ -1885,7 +1875,7 @@ IN_PROC_BROWSER_TEST_F(NavigationHandleImplBrowserTest, ...@@ -1885,7 +1875,7 @@ IN_PROC_BROWSER_TEST_F(NavigationHandleImplBrowserTest,
// Test to verify that error pages caused by network error or other // Test to verify that error pages caused by network error or other
// recoverable error are properly committed in the process for the // recoverable error are properly committed in the process for the
// destination URL. // destination URL.
IN_PROC_BROWSER_TEST_F(NavigationHandleImplBrowserTest, ErrorPageNetworkError) { IN_PROC_BROWSER_TEST_F(NavigationRequestBrowserTest, ErrorPageNetworkError) {
GURL start_url(embedded_test_server()->GetURL("foo.com", "/title1.html")); GURL start_url(embedded_test_server()->GetURL("foo.com", "/title1.html"));
GURL error_url(embedded_test_server()->GetURL("/close-socket")); GURL error_url(embedded_test_server()->GetURL("/close-socket"));
EXPECT_NE(start_url.host(), error_url.host()); EXPECT_NE(start_url.host(), error_url.host());
...@@ -1922,8 +1912,7 @@ IN_PROC_BROWSER_TEST_F(NavigationHandleImplBrowserTest, ErrorPageNetworkError) { ...@@ -1922,8 +1912,7 @@ IN_PROC_BROWSER_TEST_F(NavigationHandleImplBrowserTest, ErrorPageNetworkError) {
// blocked (net::ERR_BLOCKED_BY_CLIENT) while departing from a privileged WebUI // blocked (net::ERR_BLOCKED_BY_CLIENT) while departing from a privileged WebUI
// page (chrome://gpu). It is a security risk for the error page to commit in // page (chrome://gpu). It is a security risk for the error page to commit in
// the privileged process. // the privileged process.
IN_PROC_BROWSER_TEST_F(NavigationHandleImplBrowserTest, IN_PROC_BROWSER_TEST_F(NavigationRequestBrowserTest, BlockedRequestAfterWebUI) {
BlockedRequestAfterWebUI) {
GURL web_ui_url(GetWebUIURL("gpu")); GURL web_ui_url(GetWebUIURL("gpu"));
WebContents* web_contents = shell()->web_contents(); WebContents* web_contents = shell()->web_contents();
...@@ -1957,7 +1946,7 @@ IN_PROC_BROWSER_TEST_F(NavigationHandleImplBrowserTest, ...@@ -1957,7 +1946,7 @@ IN_PROC_BROWSER_TEST_F(NavigationHandleImplBrowserTest,
// Redirects to renderer debug URLs caused problems. // Redirects to renderer debug URLs caused problems.
// See https://crbug.com/728398. // See https://crbug.com/728398.
IN_PROC_BROWSER_TEST_F(NavigationHandleImplBrowserTest, IN_PROC_BROWSER_TEST_F(NavigationRequestBrowserTest,
RedirectToRendererDebugUrl) { RedirectToRendererDebugUrl) {
GURL url(embedded_test_server()->GetURL("/title1.html")); GURL url(embedded_test_server()->GetURL("/title1.html"));
EXPECT_TRUE(NavigateToURL(shell(), url)); EXPECT_TRUE(NavigateToURL(shell(), url));
...@@ -2003,7 +1992,7 @@ IN_PROC_BROWSER_TEST_F(NavigationHandleImplBrowserTest, ...@@ -2003,7 +1992,7 @@ IN_PROC_BROWSER_TEST_F(NavigationHandleImplBrowserTest,
// Check that iframe with embedded credentials are blocked. // Check that iframe with embedded credentials are blocked.
// See https://crbug.com/755892. // See https://crbug.com/755892.
IN_PROC_BROWSER_TEST_F(NavigationHandleImplBrowserTest, IN_PROC_BROWSER_TEST_F(NavigationRequestBrowserTest,
BlockCredentialedSubresources) { BlockCredentialedSubresources) {
if (!base::FeatureList::IsEnabled(features::kBlockCredentialedSubresources)) if (!base::FeatureList::IsEnabled(features::kBlockCredentialedSubresources))
return; return;
...@@ -2108,7 +2097,7 @@ IN_PROC_BROWSER_TEST_F(NavigationHandleImplBrowserTest, ...@@ -2108,7 +2097,7 @@ IN_PROC_BROWSER_TEST_F(NavigationHandleImplBrowserTest,
} }
} }
IN_PROC_BROWSER_TEST_F(NavigationHandleImplBrowserTest, StartToCommitMetrics) { IN_PROC_BROWSER_TEST_F(NavigationRequestBrowserTest, StartToCommitMetrics) {
enum class FrameType { enum class FrameType {
kMain, kMain,
kSub, kSub,
...@@ -2269,7 +2258,7 @@ IN_PROC_BROWSER_TEST_F(NavigationHandleImplBrowserTest, StartToCommitMetrics) { ...@@ -2269,7 +2258,7 @@ IN_PROC_BROWSER_TEST_F(NavigationHandleImplBrowserTest, StartToCommitMetrics) {
// Verify that the TimeToReadyToCommit2 metrics are correctly logged for // Verify that the TimeToReadyToCommit2 metrics are correctly logged for
// SameProcess vs CrossProcess as well as MainFrame vs Subframe cases. // SameProcess vs CrossProcess as well as MainFrame vs Subframe cases.
IN_PROC_BROWSER_TEST_F(NavigationHandleImplBrowserTest, IN_PROC_BROWSER_TEST_F(NavigationRequestBrowserTest,
TimeToReadyToCommitMetrics) { TimeToReadyToCommitMetrics) {
EXPECT_TRUE( EXPECT_TRUE(
NavigateToURL(shell(), embedded_test_server()->GetURL("/hello.html"))); NavigateToURL(shell(), embedded_test_server()->GetURL("/hello.html")));
...@@ -2339,7 +2328,7 @@ IN_PROC_BROWSER_TEST_F(NavigationHandleImplBrowserTest, ...@@ -2339,7 +2328,7 @@ IN_PROC_BROWSER_TEST_F(NavigationHandleImplBrowserTest,
} }
} }
IN_PROC_BROWSER_TEST_F(NavigationHandleImplDownloadBrowserTest, IsDownload) { IN_PROC_BROWSER_TEST_F(NavigationRequestDownloadBrowserTest, IsDownload) {
GURL url(embedded_test_server()->GetURL("/download-test1.lib")); GURL url(embedded_test_server()->GetURL("/download-test1.lib"));
NavigationHandleObserver observer(shell()->web_contents(), url); NavigationHandleObserver observer(shell()->web_contents(), url);
EXPECT_TRUE(NavigateToURLAndExpectNoCommit(shell(), url)); EXPECT_TRUE(NavigateToURLAndExpectNoCommit(shell(), url));
...@@ -2347,7 +2336,7 @@ IN_PROC_BROWSER_TEST_F(NavigationHandleImplDownloadBrowserTest, IsDownload) { ...@@ -2347,7 +2336,7 @@ IN_PROC_BROWSER_TEST_F(NavigationHandleImplDownloadBrowserTest, IsDownload) {
EXPECT_TRUE(observer.is_download()); EXPECT_TRUE(observer.is_download());
} }
IN_PROC_BROWSER_TEST_F(NavigationHandleImplDownloadBrowserTest, IN_PROC_BROWSER_TEST_F(NavigationRequestDownloadBrowserTest,
DownloadFalseForHtmlResponse) { DownloadFalseForHtmlResponse) {
GURL url(embedded_test_server()->GetURL("/title1.html")); GURL url(embedded_test_server()->GetURL("/title1.html"));
NavigationHandleObserver observer(shell()->web_contents(), url); NavigationHandleObserver observer(shell()->web_contents(), url);
...@@ -2356,7 +2345,7 @@ IN_PROC_BROWSER_TEST_F(NavigationHandleImplDownloadBrowserTest, ...@@ -2356,7 +2345,7 @@ IN_PROC_BROWSER_TEST_F(NavigationHandleImplDownloadBrowserTest,
EXPECT_FALSE(observer.is_download()); EXPECT_FALSE(observer.is_download());
} }
IN_PROC_BROWSER_TEST_F(NavigationHandleImplDownloadBrowserTest, IN_PROC_BROWSER_TEST_F(NavigationRequestDownloadBrowserTest,
DownloadFalseFor404) { DownloadFalseFor404) {
GURL url(embedded_test_server()->GetURL("/page404.html")); GURL url(embedded_test_server()->GetURL("/page404.html"));
NavigationHandleObserver observer(shell()->web_contents(), url); NavigationHandleObserver observer(shell()->web_contents(), url);
...@@ -2365,7 +2354,7 @@ IN_PROC_BROWSER_TEST_F(NavigationHandleImplDownloadBrowserTest, ...@@ -2365,7 +2354,7 @@ IN_PROC_BROWSER_TEST_F(NavigationHandleImplDownloadBrowserTest,
EXPECT_FALSE(observer.is_download()); EXPECT_FALSE(observer.is_download());
} }
IN_PROC_BROWSER_TEST_F(NavigationHandleImplDownloadBrowserTest, IN_PROC_BROWSER_TEST_F(NavigationRequestDownloadBrowserTest,
DownloadFalseForFailedNavigation) { DownloadFalseForFailedNavigation) {
GURL url(embedded_test_server()->GetURL("/download-test1.lib")); GURL url(embedded_test_server()->GetURL("/download-test1.lib"));
NavigationHandleObserver observer(shell()->web_contents(), url); NavigationHandleObserver observer(shell()->web_contents(), url);
...@@ -2380,7 +2369,7 @@ IN_PROC_BROWSER_TEST_F(NavigationHandleImplDownloadBrowserTest, ...@@ -2380,7 +2369,7 @@ IN_PROC_BROWSER_TEST_F(NavigationHandleImplDownloadBrowserTest,
EXPECT_FALSE(observer.is_download()); EXPECT_FALSE(observer.is_download());
} }
IN_PROC_BROWSER_TEST_F(NavigationHandleImplDownloadBrowserTest, IN_PROC_BROWSER_TEST_F(NavigationRequestDownloadBrowserTest,
RedirectToDownload) { RedirectToDownload) {
GURL redirect_url( GURL redirect_url(
embedded_test_server()->GetURL("/cross-site/bar.com/download-test1.lib")); embedded_test_server()->GetURL("/cross-site/bar.com/download-test1.lib"));
...@@ -2391,7 +2380,7 @@ IN_PROC_BROWSER_TEST_F(NavigationHandleImplDownloadBrowserTest, ...@@ -2391,7 +2380,7 @@ IN_PROC_BROWSER_TEST_F(NavigationHandleImplDownloadBrowserTest,
EXPECT_TRUE(observer.is_download()); EXPECT_TRUE(observer.is_download());
} }
IN_PROC_BROWSER_TEST_F(NavigationHandleImplDownloadBrowserTest, IN_PROC_BROWSER_TEST_F(NavigationRequestDownloadBrowserTest,
RedirectToDownloadFails) { RedirectToDownloadFails) {
GURL redirect_url( GURL redirect_url(
embedded_test_server()->GetURL("/cross-site/bar.com/download-test1.lib")); embedded_test_server()->GetURL("/cross-site/bar.com/download-test1.lib"));
...@@ -2411,14 +2400,13 @@ IN_PROC_BROWSER_TEST_F(NavigationHandleImplDownloadBrowserTest, ...@@ -2411,14 +2400,13 @@ IN_PROC_BROWSER_TEST_F(NavigationHandleImplDownloadBrowserTest,
// Set of tests that check the various NavigationThrottle events can be used // Set of tests that check the various NavigationThrottle events can be used
// with custom error pages. // with custom error pages.
class NavigationHandleImplThrottleResultWithErrorPageBrowserTest class NavigationRequestThrottleResultWithErrorPageBrowserTest
: public NavigationHandleImplBrowserTest, : public NavigationRequestBrowserTest,
public ::testing::WithParamInterface<NavigationThrottle::ThrottleAction> { public ::testing::WithParamInterface<NavigationThrottle::ThrottleAction> {
}; };
IN_PROC_BROWSER_TEST_P( IN_PROC_BROWSER_TEST_P(NavigationRequestThrottleResultWithErrorPageBrowserTest,
NavigationHandleImplThrottleResultWithErrorPageBrowserTest, WillStartRequest) {
WillStartRequest) {
NavigationThrottle::ThrottleAction action = GetParam(); NavigationThrottle::ThrottleAction action = GetParam();
if (action == NavigationThrottle::CANCEL_AND_IGNORE) { if (action == NavigationThrottle::CANCEL_AND_IGNORE) {
...@@ -2447,9 +2435,8 @@ IN_PROC_BROWSER_TEST_P( ...@@ -2447,9 +2435,8 @@ IN_PROC_BROWSER_TEST_P(
url, action, TestNavigationThrottleInstaller::WILL_START_REQUEST); url, action, TestNavigationThrottleInstaller::WILL_START_REQUEST);
} }
IN_PROC_BROWSER_TEST_P( IN_PROC_BROWSER_TEST_P(NavigationRequestThrottleResultWithErrorPageBrowserTest,
NavigationHandleImplThrottleResultWithErrorPageBrowserTest, WillRedirectRequest) {
WillRedirectRequest) {
NavigationThrottle::ThrottleAction action = GetParam(); NavigationThrottle::ThrottleAction action = GetParam();
if (action == NavigationThrottle::CANCEL_AND_IGNORE) { if (action == NavigationThrottle::CANCEL_AND_IGNORE) {
...@@ -2478,9 +2465,8 @@ IN_PROC_BROWSER_TEST_P( ...@@ -2478,9 +2465,8 @@ IN_PROC_BROWSER_TEST_P(
url, action, TestNavigationThrottleInstaller::WILL_REDIRECT_REQUEST); url, action, TestNavigationThrottleInstaller::WILL_REDIRECT_REQUEST);
} }
IN_PROC_BROWSER_TEST_P( IN_PROC_BROWSER_TEST_P(NavigationRequestThrottleResultWithErrorPageBrowserTest,
NavigationHandleImplThrottleResultWithErrorPageBrowserTest, WillFailRequest) {
WillFailRequest) {
NavigationThrottle::ThrottleAction action = GetParam(); NavigationThrottle::ThrottleAction action = GetParam();
if (action == NavigationThrottle::PROCEED || if (action == NavigationThrottle::PROCEED ||
...@@ -2505,9 +2491,8 @@ IN_PROC_BROWSER_TEST_P( ...@@ -2505,9 +2491,8 @@ IN_PROC_BROWSER_TEST_P(
url, action, TestNavigationThrottleInstaller::WILL_FAIL_REQUEST); url, action, TestNavigationThrottleInstaller::WILL_FAIL_REQUEST);
} }
IN_PROC_BROWSER_TEST_P( IN_PROC_BROWSER_TEST_P(NavigationRequestThrottleResultWithErrorPageBrowserTest,
NavigationHandleImplThrottleResultWithErrorPageBrowserTest, WillProcessResponse) {
WillProcessResponse) {
NavigationThrottle::ThrottleAction action = GetParam(); NavigationThrottle::ThrottleAction action = GetParam();
if (action == NavigationThrottle::CANCEL_AND_IGNORE) { if (action == NavigationThrottle::CANCEL_AND_IGNORE) {
...@@ -2535,14 +2520,14 @@ IN_PROC_BROWSER_TEST_P( ...@@ -2535,14 +2520,14 @@ IN_PROC_BROWSER_TEST_P(
INSTANTIATE_TEST_SUITE_P( INSTANTIATE_TEST_SUITE_P(
/* no prefix */, /* no prefix */,
NavigationHandleImplThrottleResultWithErrorPageBrowserTest, NavigationRequestThrottleResultWithErrorPageBrowserTest,
testing::Range(NavigationThrottle::ThrottleAction::FIRST, testing::Range(NavigationThrottle::ThrottleAction::FIRST,
NavigationThrottle::ThrottleAction::LAST)); NavigationThrottle::ThrottleAction::LAST));
// The set of tests... // The set of tests...
// * NavigationHandleImplDownloadBrowserTest.AllowedResourceDownloaded // * NavigationRequestDownloadBrowserTest.AllowedResourceDownloaded
// * NavigationHandleImplDownloadBrowserTest.AllowedResourceNotDownloaded // * NavigationRequestDownloadBrowserTest.AllowedResourceNotDownloaded
// * NavigationHandleImplDownloadBrowserTest.Disallowed // * NavigationRequestDownloadBrowserTest.Disallowed
// //
// ...covers every combination of possible states for: // ...covers every combination of possible states for:
// * CommonNavigationParams::download_policy (allow vs disallow) // * CommonNavigationParams::download_policy (allow vs disallow)
...@@ -2550,7 +2535,7 @@ INSTANTIATE_TEST_SUITE_P( ...@@ -2550,7 +2535,7 @@ INSTANTIATE_TEST_SUITE_P(
// //
// Download policies that enumerate allowed / disallowed options are not tested // Download policies that enumerate allowed / disallowed options are not tested
// here. // here.
IN_PROC_BROWSER_TEST_F(NavigationHandleImplDownloadBrowserTest, IN_PROC_BROWSER_TEST_F(NavigationRequestDownloadBrowserTest,
AllowedResourceDownloaded) { AllowedResourceDownloaded) {
GURL simple_url(embedded_test_server()->GetURL("/simple_page.html")); GURL simple_url(embedded_test_server()->GetURL("/simple_page.html"));
...@@ -2572,8 +2557,8 @@ IN_PROC_BROWSER_TEST_F(NavigationHandleImplDownloadBrowserTest, ...@@ -2572,8 +2557,8 @@ IN_PROC_BROWSER_TEST_F(NavigationHandleImplDownloadBrowserTest,
EXPECT_FALSE(handle_observer.is_download()); EXPECT_FALSE(handle_observer.is_download());
} }
// See NavigationHandleImplDownloadBrowserTest.AllowedResourceNotDownloaded // See NavigationRequestDownloadBrowserTest.AllowedResourceNotDownloaded
IN_PROC_BROWSER_TEST_F(NavigationHandleImplDownloadBrowserTest, IN_PROC_BROWSER_TEST_F(NavigationRequestDownloadBrowserTest,
AllowedResourceNotDownloaded) { AllowedResourceNotDownloaded) {
GURL download_url(embedded_test_server()->GetURL("/download-test1.lib")); GURL download_url(embedded_test_server()->GetURL("/download-test1.lib"));
...@@ -2596,8 +2581,8 @@ IN_PROC_BROWSER_TEST_F(NavigationHandleImplDownloadBrowserTest, ...@@ -2596,8 +2581,8 @@ IN_PROC_BROWSER_TEST_F(NavigationHandleImplDownloadBrowserTest,
EXPECT_TRUE(handle_observer.is_download()); EXPECT_TRUE(handle_observer.is_download());
} }
// See NavigationHandleImplDownloadBrowserTest.AllowedResourceNotDownloaded // See NavigationRequestDownloadBrowserTest.AllowedResourceNotDownloaded
IN_PROC_BROWSER_TEST_F(NavigationHandleImplDownloadBrowserTest, Disallowed) { IN_PROC_BROWSER_TEST_F(NavigationRequestDownloadBrowserTest, Disallowed) {
GURL download_url(embedded_test_server()->GetURL("/download-test1.lib")); GURL download_url(embedded_test_server()->GetURL("/download-test1.lib"));
// An URL is allowed to be a download iff it is not a view-source URL. // An URL is allowed to be a download iff it is not a view-source URL.
...@@ -2626,12 +2611,12 @@ IN_PROC_BROWSER_TEST_F(NavigationHandleImplDownloadBrowserTest, Disallowed) { ...@@ -2626,12 +2611,12 @@ IN_PROC_BROWSER_TEST_F(NavigationHandleImplDownloadBrowserTest, Disallowed) {
EXPECT_FALSE(handle_observer.is_download()); EXPECT_FALSE(handle_observer.is_download());
} }
class NavigationHandleImplBackForwardBrowserTest class NavigationRequestBackForwardBrowserTest
: public NavigationHandleImplBrowserTest, : public NavigationRequestBrowserTest,
public WebContentsObserver { public WebContentsObserver {
protected: protected:
void SetUpOnMainThread() override { void SetUpOnMainThread() override {
NavigationHandleImplBrowserTest::SetUpOnMainThread(); NavigationRequestBrowserTest::SetUpOnMainThread();
WebContentsObserver::Observe(shell()->web_contents()); WebContentsObserver::Observe(shell()->web_contents());
} }
...@@ -2645,7 +2630,7 @@ class NavigationHandleImplBackForwardBrowserTest ...@@ -2645,7 +2630,7 @@ class NavigationHandleImplBackForwardBrowserTest
std::vector<int64_t> offsets_; std::vector<int64_t> offsets_;
}; };
IN_PROC_BROWSER_TEST_F(NavigationHandleImplBackForwardBrowserTest, IN_PROC_BROWSER_TEST_F(NavigationRequestBackForwardBrowserTest,
NavigationEntryOffsets) { NavigationEntryOffsets) {
const GURL url1(embedded_test_server()->GetURL("/title1.html")); const GURL url1(embedded_test_server()->GetURL("/title1.html"));
const GURL url2(embedded_test_server()->GetURL("/title2.html")); const GURL url2(embedded_test_server()->GetURL("/title2.html"));
...@@ -2702,7 +2687,7 @@ IN_PROC_BROWSER_TEST_F(NavigationHandleImplBackForwardBrowserTest, ...@@ -2702,7 +2687,7 @@ IN_PROC_BROWSER_TEST_F(NavigationHandleImplBackForwardBrowserTest,
EXPECT_THAT(offsets_, testing::ElementsAre(1, 0, 1, 1, -1, -1, 1)); EXPECT_THAT(offsets_, testing::ElementsAre(1, 0, 1, 1, -1, -1, 1));
} }
IN_PROC_BROWSER_TEST_F(NavigationHandleImplBackForwardBrowserTest, IN_PROC_BROWSER_TEST_F(NavigationRequestBackForwardBrowserTest,
NavigationEntryOffsetsForSubframes) { NavigationEntryOffsetsForSubframes) {
const GURL url1(embedded_test_server()->GetURL("/title1.html")); const GURL url1(embedded_test_server()->GetURL("/title1.html"));
const GURL url1_fragment1( const GURL url1_fragment1(
...@@ -2781,7 +2766,7 @@ IN_PROC_BROWSER_TEST_F(NavigationHandleImplBackForwardBrowserTest, ...@@ -2781,7 +2766,7 @@ IN_PROC_BROWSER_TEST_F(NavigationHandleImplBackForwardBrowserTest,
testing::ElementsAre(1, 1, 1, 0, 1, 1, -1, 1, -1, -1, -1, 4)); testing::ElementsAre(1, 1, 1, 0, 1, 1, -1, 1, -1, -1, -1, 4));
} }
IN_PROC_BROWSER_TEST_F(NavigationHandleImplBackForwardBrowserTest, IN_PROC_BROWSER_TEST_F(NavigationRequestBackForwardBrowserTest,
NavigationEntryLimit) { NavigationEntryLimit) {
const GURL url1(embedded_test_server()->GetURL("/title1.html")); const GURL url1(embedded_test_server()->GetURL("/title1.html"));
...@@ -2797,7 +2782,7 @@ IN_PROC_BROWSER_TEST_F(NavigationHandleImplBackForwardBrowserTest, ...@@ -2797,7 +2782,7 @@ IN_PROC_BROWSER_TEST_F(NavigationHandleImplBackForwardBrowserTest,
EXPECT_THAT(offsets_, testing::ElementsAre(1, 1, 1, 1, 1)); EXPECT_THAT(offsets_, testing::ElementsAre(1, 1, 1, 1, 1));
} }
IN_PROC_BROWSER_TEST_F(NavigationHandleImplBackForwardBrowserTest, IN_PROC_BROWSER_TEST_F(NavigationRequestBackForwardBrowserTest,
LocationReplace) { LocationReplace) {
const GURL url1(embedded_test_server()->GetURL("/title1.html")); const GURL url1(embedded_test_server()->GetURL("/title1.html"));
...@@ -2819,7 +2804,7 @@ IN_PROC_BROWSER_TEST_F(NavigationHandleImplBackForwardBrowserTest, ...@@ -2819,7 +2804,7 @@ IN_PROC_BROWSER_TEST_F(NavigationHandleImplBackForwardBrowserTest,
// Tests that the correct net::AuthChallengeInfo is exposed from the // Tests that the correct net::AuthChallengeInfo is exposed from the
// NavigationHandle when the page requests authentication. // NavigationHandle when the page requests authentication.
IN_PROC_BROWSER_TEST_F(NavigationHandleImplBrowserTest, AuthChallengeInfo) { IN_PROC_BROWSER_TEST_F(NavigationRequestBrowserTest, AuthChallengeInfo) {
GURL url(embedded_test_server()->GetURL("/auth-basic")); GURL url(embedded_test_server()->GetURL("/auth-basic"));
NavigationHandleObserver observer(shell()->web_contents(), url); NavigationHandleObserver observer(shell()->web_contents(), url);
EXPECT_TRUE(NavigateToURL(shell(), url)); EXPECT_TRUE(NavigateToURL(shell(), url));
......
...@@ -925,7 +925,7 @@ test("content_browsertests") { ...@@ -925,7 +925,7 @@ test("content_browsertests") {
"../browser/frame_host/frame_tree_browsertest.cc", "../browser/frame_host/frame_tree_browsertest.cc",
"../browser/frame_host/interstitial_page_impl_browsertest.cc", "../browser/frame_host/interstitial_page_impl_browsertest.cc",
"../browser/frame_host/navigation_controller_impl_browsertest.cc", "../browser/frame_host/navigation_controller_impl_browsertest.cc",
"../browser/frame_host/navigation_handle_impl_browsertest.cc", "../browser/frame_host/navigation_request_browsertest.cc",
"../browser/frame_host/render_document_host_browsertest.cc", "../browser/frame_host/render_document_host_browsertest.cc",
"../browser/frame_host/render_frame_host_impl_browsertest.cc", "../browser/frame_host/render_frame_host_impl_browsertest.cc",
"../browser/frame_host/render_frame_host_manager_browsertest.cc", "../browser/frame_host/render_frame_host_manager_browsertest.cc",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment