| Index: content/browser/frame_host/navigation_handle_impl_unittest.cc
|
| diff --git a/content/browser/frame_host/navigation_handle_impl_unittest.cc b/content/browser/frame_host/navigation_handle_impl_unittest.cc
|
| index fc78314c663dea77f9b6eafc7041ccf649173033..c02cb0ab5df1cecd4bfb787f8f448375457d3c06 100644
|
| --- a/content/browser/frame_host/navigation_handle_impl_unittest.cc
|
| +++ b/content/browser/frame_host/navigation_handle_impl_unittest.cc
|
| @@ -127,6 +127,7 @@ class NavigationHandleImplTest : public RenderViewHostImplTestHarness {
|
| // the NavigationHandleImplTest.
|
| test_handle_->WillRedirectRequest(
|
| GURL(), "GET", GURL(), false, scoped_refptr<net::HttpResponseHeaders>(),
|
| + net::HttpResponseInfo::CONNECTION_INFO_HTTP1_1,
|
| base::Bind(&NavigationHandleImplTest::UpdateThrottleCheckResult,
|
| base::Unretained(this)));
|
| }
|
| @@ -143,8 +144,8 @@ class NavigationHandleImplTest : public RenderViewHostImplTestHarness {
|
| // It's safe to use base::Unretained since the NavigationHandle is owned by
|
| // the NavigationHandleImplTest.
|
| test_handle_->WillProcessResponse(
|
| - main_test_rfh(),
|
| - scoped_refptr<net::HttpResponseHeaders>(), SSLStatus(),
|
| + main_test_rfh(), scoped_refptr<net::HttpResponseHeaders>(),
|
| + net::HttpResponseInfo::CONNECTION_INFO_QUIC, SSLStatus(),
|
| GlobalRequestID(), false, false, false, base::Closure(),
|
| base::Bind(&NavigationHandleImplTest::UpdateThrottleCheckResult,
|
| base::Unretained(this)));
|
| @@ -192,16 +193,33 @@ TEST_F(NavigationHandleImplTest, SimpleDataChecks) {
|
| SimulateWillStartRequest();
|
| EXPECT_EQ(REQUEST_CONTEXT_TYPE_LOCATION,
|
| test_handle()->GetRequestContextType());
|
| + EXPECT_EQ(net::HttpResponseInfo::CONNECTION_INFO_UNKNOWN,
|
| + test_handle()->GetConnectionInfo());
|
|
|
| test_handle()->Resume();
|
| SimulateWillRedirectRequest();
|
| EXPECT_EQ(REQUEST_CONTEXT_TYPE_LOCATION,
|
| test_handle()->GetRequestContextType());
|
| + EXPECT_EQ(net::HttpResponseInfo::CONNECTION_INFO_HTTP1_1,
|
| + test_handle()->GetConnectionInfo());
|
|
|
| test_handle()->Resume();
|
| SimulateWillProcessResponse();
|
| EXPECT_EQ(REQUEST_CONTEXT_TYPE_LOCATION,
|
| test_handle()->GetRequestContextType());
|
| + EXPECT_EQ(net::HttpResponseInfo::CONNECTION_INFO_QUIC,
|
| + test_handle()->GetConnectionInfo());
|
| +}
|
| +
|
| +TEST_F(NavigationHandleImplTest, SimpleDataCheckNoRedirect) {
|
| + SimulateWillStartRequest();
|
| + EXPECT_EQ(net::HttpResponseInfo::CONNECTION_INFO_UNKNOWN,
|
| + test_handle()->GetConnectionInfo());
|
| +
|
| + test_handle()->Resume();
|
| + SimulateWillProcessResponse();
|
| + EXPECT_EQ(net::HttpResponseInfo::CONNECTION_INFO_QUIC,
|
| + test_handle()->GetConnectionInfo());
|
| }
|
|
|
| // Checks that a deferred navigation can be properly resumed.
|
|
|