| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include <string> | 5 #include <string> |
| 6 #include <vector> | 6 #include <vector> |
| 7 | 7 |
| 8 #include "net/base/auth.h" | 8 #include "net/base/auth.h" |
| 9 #include "net/base/net_log_unittest.h" | 9 #include "net/base/net_log_unittest.h" |
| 10 #include "net/http/http_network_session_peer.h" | 10 #include "net/http/http_network_session_peer.h" |
| (...skipping 328 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 339 // Read the result of a particular transaction, knowing that we've got | 339 // Read the result of a particular transaction, knowing that we've got |
| 340 // multiple transactions in the read pipeline; so as we read, we may have | 340 // multiple transactions in the read pipeline; so as we read, we may have |
| 341 // to skip over data destined for other transactions while we consume | 341 // to skip over data destined for other transactions while we consume |
| 342 // the data for |trans|. | 342 // the data for |trans|. |
| 343 int ReadResult(HttpNetworkTransaction* trans, | 343 int ReadResult(HttpNetworkTransaction* trans, |
| 344 OrderedSocketData* data, | 344 OrderedSocketData* data, |
| 345 std::string* result) { | 345 std::string* result) { |
| 346 const int kSize = 3000; | 346 const int kSize = 3000; |
| 347 | 347 |
| 348 int bytes_read = 0; | 348 int bytes_read = 0; |
| 349 scoped_refptr<net::IOBufferWithSize> buf = new net::IOBufferWithSize(kSize); | 349 scoped_refptr<net::IOBufferWithSize> buf(new net::IOBufferWithSize(kSize)); |
| 350 TestCompletionCallback callback; | 350 TestCompletionCallback callback; |
| 351 while (true) { | 351 while (true) { |
| 352 int rv = trans->Read(buf, kSize, &callback); | 352 int rv = trans->Read(buf, kSize, &callback); |
| 353 if (rv == ERR_IO_PENDING) { | 353 if (rv == ERR_IO_PENDING) { |
| 354 // Multiple transactions may be in the data set. Keep pulling off | 354 // Multiple transactions may be in the data set. Keep pulling off |
| 355 // reads until we complete our callback. | 355 // reads until we complete our callback. |
| 356 while (!callback.have_result()) { | 356 while (!callback.have_result()) { |
| 357 data->CompleteRead(); | 357 data->CompleteRead(); |
| 358 MessageLoop::current()->RunAllPending(); | 358 MessageLoop::current()->RunAllPending(); |
| 359 } | 359 } |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 455 // All tests are run with three different connection types: SPDY after NPN | 455 // All tests are run with three different connection types: SPDY after NPN |
| 456 // negotiation, SPDY without SSL, and SPDY with SSL. | 456 // negotiation, SPDY without SSL, and SPDY with SSL. |
| 457 INSTANTIATE_TEST_CASE_P(Spdy, | 457 INSTANTIATE_TEST_CASE_P(Spdy, |
| 458 SpdyNetworkTransactionTest, | 458 SpdyNetworkTransactionTest, |
| 459 ::testing::Values(SPDYNOSSL, SPDYSSL, SPDYNPN)); | 459 ::testing::Values(SPDYNOSSL, SPDYSSL, SPDYNPN)); |
| 460 | 460 |
| 461 | 461 |
| 462 // Verify HttpNetworkTransaction constructor. | 462 // Verify HttpNetworkTransaction constructor. |
| 463 TEST_P(SpdyNetworkTransactionTest, Constructor) { | 463 TEST_P(SpdyNetworkTransactionTest, Constructor) { |
| 464 SpdySessionDependencies session_deps; | 464 SpdySessionDependencies session_deps; |
| 465 scoped_refptr<HttpNetworkSession> session = | 465 scoped_refptr<HttpNetworkSession> session( |
| 466 SpdySessionDependencies::SpdyCreateSession(&session_deps); | 466 SpdySessionDependencies::SpdyCreateSession(&session_deps)); |
| 467 scoped_ptr<HttpTransaction> trans(new HttpNetworkTransaction(session)); | 467 scoped_ptr<HttpTransaction> trans(new HttpNetworkTransaction(session)); |
| 468 } | 468 } |
| 469 | 469 |
| 470 TEST_P(SpdyNetworkTransactionTest, Get) { | 470 TEST_P(SpdyNetworkTransactionTest, Get) { |
| 471 // Construct the request. | 471 // Construct the request. |
| 472 scoped_ptr<spdy::SpdyFrame> req(ConstructSpdyGet(NULL, 0, false, 1, LOWEST)); | 472 scoped_ptr<spdy::SpdyFrame> req(ConstructSpdyGet(NULL, 0, false, 1, LOWEST)); |
| 473 MockWrite writes[] = { CreateMockWrite(*req) }; | 473 MockWrite writes[] = { CreateMockWrite(*req) }; |
| 474 | 474 |
| 475 scoped_ptr<spdy::SpdyFrame> resp(ConstructSpdyGetSynReply(NULL, 0, 1)); | 475 scoped_ptr<spdy::SpdyFrame> resp(ConstructSpdyGetSynReply(NULL, 0, 1)); |
| 476 scoped_ptr<spdy::SpdyFrame> body(ConstructSpdyBodyFrame(1, true)); | 476 scoped_ptr<spdy::SpdyFrame> body(ConstructSpdyBodyFrame(1, true)); |
| (...skipping 1225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1702 stream->stream()->recv_window_size()); | 1702 stream->stream()->recv_window_size()); |
| 1703 | 1703 |
| 1704 const HttpResponseInfo* response = trans->GetResponseInfo(); | 1704 const HttpResponseInfo* response = trans->GetResponseInfo(); |
| 1705 ASSERT_TRUE(response != NULL); | 1705 ASSERT_TRUE(response != NULL); |
| 1706 ASSERT_TRUE(response->headers != NULL); | 1706 ASSERT_TRUE(response->headers != NULL); |
| 1707 EXPECT_EQ("HTTP/1.1 200 OK", response->headers->GetStatusLine()); | 1707 EXPECT_EQ("HTTP/1.1 200 OK", response->headers->GetStatusLine()); |
| 1708 EXPECT_TRUE(response->was_fetched_via_spdy); | 1708 EXPECT_TRUE(response->was_fetched_via_spdy); |
| 1709 | 1709 |
| 1710 // Issue a read which will cause a WINDOW_UPDATE to be sent and window | 1710 // Issue a read which will cause a WINDOW_UPDATE to be sent and window |
| 1711 // size increased to default. | 1711 // size increased to default. |
| 1712 scoped_refptr<net::IOBuffer> buf = new net::IOBuffer(kUploadDataSize); | 1712 scoped_refptr<net::IOBuffer> buf(new net::IOBuffer(kUploadDataSize)); |
| 1713 rv = trans->Read(buf, kUploadDataSize, NULL); | 1713 rv = trans->Read(buf, kUploadDataSize, NULL); |
| 1714 EXPECT_EQ(kUploadDataSize, rv); | 1714 EXPECT_EQ(kUploadDataSize, rv); |
| 1715 std::string content(buf->data(), buf->data()+kUploadDataSize); | 1715 std::string content(buf->data(), buf->data()+kUploadDataSize); |
| 1716 EXPECT_STREQ(kUploadData, content.c_str()); | 1716 EXPECT_STREQ(kUploadData, content.c_str()); |
| 1717 | 1717 |
| 1718 // Schedule the reading of empty data frame with FIN | 1718 // Schedule the reading of empty data frame with FIN |
| 1719 data->CompleteRead(); | 1719 data->CompleteRead(); |
| 1720 | 1720 |
| 1721 // Force write of WINDOW_UPDATE which was scheduled during the above | 1721 // Force write of WINDOW_UPDATE which was scheduled during the above |
| 1722 // read. | 1722 // read. |
| (...skipping 345 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2068 HttpNetworkTransaction* trans = helper.trans(); | 2068 HttpNetworkTransaction* trans = helper.trans(); |
| 2069 | 2069 |
| 2070 // Start the transaction with basic parameters. | 2070 // Start the transaction with basic parameters. |
| 2071 TestCompletionCallback callback; | 2071 TestCompletionCallback callback; |
| 2072 int rv = trans->Start(&helper.request(), &callback, BoundNetLog()); | 2072 int rv = trans->Start(&helper.request(), &callback, BoundNetLog()); |
| 2073 EXPECT_EQ(ERR_IO_PENDING, rv); | 2073 EXPECT_EQ(ERR_IO_PENDING, rv); |
| 2074 rv = callback.WaitForResult(); | 2074 rv = callback.WaitForResult(); |
| 2075 | 2075 |
| 2076 StartTransactionCallback callback2(helper.session(), helper); | 2076 StartTransactionCallback callback2(helper.session(), helper); |
| 2077 const int kSize = 3000; | 2077 const int kSize = 3000; |
| 2078 scoped_refptr<net::IOBuffer> buf = new net::IOBuffer(kSize); | 2078 scoped_refptr<net::IOBuffer> buf(new net::IOBuffer(kSize)); |
| 2079 rv = trans->Read(buf, kSize, &callback2); | 2079 rv = trans->Read(buf, kSize, &callback2); |
| 2080 // This forces an err_IO_pending, which sets the callback. | 2080 // This forces an err_IO_pending, which sets the callback. |
| 2081 data->CompleteRead(); | 2081 data->CompleteRead(); |
| 2082 // This finishes the read. | 2082 // This finishes the read. |
| 2083 data->CompleteRead(); | 2083 data->CompleteRead(); |
| 2084 helper.VerifyDataConsumed(); | 2084 helper.VerifyDataConsumed(); |
| 2085 } | 2085 } |
| 2086 | 2086 |
| 2087 class SpdyNetworkTransactionTest::DeleteSessionCallback | 2087 class SpdyNetworkTransactionTest::DeleteSessionCallback |
| 2088 : public CallbackRunner< Tuple1<int> > { | 2088 : public CallbackRunner< Tuple1<int> > { |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2128 // Start the transaction with basic parameters. | 2128 // Start the transaction with basic parameters. |
| 2129 TestCompletionCallback callback; | 2129 TestCompletionCallback callback; |
| 2130 int rv = trans->Start(&helper.request(), &callback, BoundNetLog()); | 2130 int rv = trans->Start(&helper.request(), &callback, BoundNetLog()); |
| 2131 EXPECT_EQ(ERR_IO_PENDING, rv); | 2131 EXPECT_EQ(ERR_IO_PENDING, rv); |
| 2132 rv = callback.WaitForResult(); | 2132 rv = callback.WaitForResult(); |
| 2133 | 2133 |
| 2134 // Setup a user callback which will delete the session, and clear out the | 2134 // Setup a user callback which will delete the session, and clear out the |
| 2135 // memory holding the stream object. Note that the callback deletes trans. | 2135 // memory holding the stream object. Note that the callback deletes trans. |
| 2136 DeleteSessionCallback callback2(helper); | 2136 DeleteSessionCallback callback2(helper); |
| 2137 const int kSize = 3000; | 2137 const int kSize = 3000; |
| 2138 scoped_refptr<net::IOBuffer> buf = new net::IOBuffer(kSize); | 2138 scoped_refptr<net::IOBuffer> buf(new net::IOBuffer(kSize)); |
| 2139 rv = trans->Read(buf, kSize, &callback2); | 2139 rv = trans->Read(buf, kSize, &callback2); |
| 2140 ASSERT_EQ(ERR_IO_PENDING, rv); | 2140 ASSERT_EQ(ERR_IO_PENDING, rv); |
| 2141 data->CompleteRead(); | 2141 data->CompleteRead(); |
| 2142 | 2142 |
| 2143 // Finish running rest of tasks. | 2143 // Finish running rest of tasks. |
| 2144 MessageLoop::current()->RunAllPending(); | 2144 MessageLoop::current()->RunAllPending(); |
| 2145 helper.VerifyDataConsumed(); | 2145 helper.VerifyDataConsumed(); |
| 2146 } | 2146 } |
| 2147 | 2147 |
| 2148 // Send a spdy request to www.google.com that gets redirected to www.foo.com. | 2148 // Send a spdy request to www.google.com that gets redirected to www.foo.com. |
| (...skipping 1262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3411 out.status_line = response->headers->GetStatusLine(); | 3411 out.status_line = response->headers->GetStatusLine(); |
| 3412 out.response_info = *response; // Make a copy so we can verify. | 3412 out.response_info = *response; // Make a copy so we can verify. |
| 3413 | 3413 |
| 3414 // Read Data | 3414 // Read Data |
| 3415 TestCompletionCallback read_callback; | 3415 TestCompletionCallback read_callback; |
| 3416 | 3416 |
| 3417 std::string content; | 3417 std::string content; |
| 3418 do { | 3418 do { |
| 3419 // Read small chunks at a time. | 3419 // Read small chunks at a time. |
| 3420 const int kSmallReadSize = 3; | 3420 const int kSmallReadSize = 3; |
| 3421 scoped_refptr<net::IOBuffer> buf = new net::IOBuffer(kSmallReadSize); | 3421 scoped_refptr<net::IOBuffer> buf(new net::IOBuffer(kSmallReadSize)); |
| 3422 rv = trans->Read(buf, kSmallReadSize, &read_callback); | 3422 rv = trans->Read(buf, kSmallReadSize, &read_callback); |
| 3423 if (rv == net::ERR_IO_PENDING) { | 3423 if (rv == net::ERR_IO_PENDING) { |
| 3424 data->CompleteRead(); | 3424 data->CompleteRead(); |
| 3425 rv = read_callback.WaitForResult(); | 3425 rv = read_callback.WaitForResult(); |
| 3426 } | 3426 } |
| 3427 if (rv > 0) { | 3427 if (rv > 0) { |
| 3428 content.append(buf->data(), rv); | 3428 content.append(buf->data(), rv); |
| 3429 } else if (rv < 0) { | 3429 } else if (rv < 0) { |
| 3430 NOTREACHED(); | 3430 NOTREACHED(); |
| 3431 } | 3431 } |
| (...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3577 out.response_info = *response; // Make a copy so we can verify. | 3577 out.response_info = *response; // Make a copy so we can verify. |
| 3578 | 3578 |
| 3579 // Read Data | 3579 // Read Data |
| 3580 TestCompletionCallback read_callback; | 3580 TestCompletionCallback read_callback; |
| 3581 | 3581 |
| 3582 std::string content; | 3582 std::string content; |
| 3583 int reads_completed = 0; | 3583 int reads_completed = 0; |
| 3584 do { | 3584 do { |
| 3585 // Read small chunks at a time. | 3585 // Read small chunks at a time. |
| 3586 const int kSmallReadSize = 14; | 3586 const int kSmallReadSize = 14; |
| 3587 scoped_refptr<net::IOBuffer> buf = new net::IOBuffer(kSmallReadSize); | 3587 scoped_refptr<net::IOBuffer> buf(new net::IOBuffer(kSmallReadSize)); |
| 3588 rv = trans->Read(buf, kSmallReadSize, &read_callback); | 3588 rv = trans->Read(buf, kSmallReadSize, &read_callback); |
| 3589 if (rv == net::ERR_IO_PENDING) { | 3589 if (rv == net::ERR_IO_PENDING) { |
| 3590 data->CompleteRead(); | 3590 data->CompleteRead(); |
| 3591 rv = read_callback.WaitForResult(); | 3591 rv = read_callback.WaitForResult(); |
| 3592 } | 3592 } |
| 3593 if (rv > 0) { | 3593 if (rv > 0) { |
| 3594 EXPECT_EQ(kSmallReadSize, rv); | 3594 EXPECT_EQ(kSmallReadSize, rv); |
| 3595 content.append(buf->data(), rv); | 3595 content.append(buf->data(), rv); |
| 3596 } else if (rv < 0) { | 3596 } else if (rv < 0) { |
| 3597 FAIL() << "Unexpected read error: " << rv; | 3597 FAIL() << "Unexpected read error: " << rv; |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3672 out.response_info = *response; // Make a copy so we can verify. | 3672 out.response_info = *response; // Make a copy so we can verify. |
| 3673 | 3673 |
| 3674 // Read Data | 3674 // Read Data |
| 3675 TestCompletionCallback read_callback; | 3675 TestCompletionCallback read_callback; |
| 3676 | 3676 |
| 3677 std::string content; | 3677 std::string content; |
| 3678 int reads_completed = 0; | 3678 int reads_completed = 0; |
| 3679 do { | 3679 do { |
| 3680 // Read small chunks at a time. | 3680 // Read small chunks at a time. |
| 3681 const int kSmallReadSize = 14; | 3681 const int kSmallReadSize = 14; |
| 3682 scoped_refptr<net::IOBuffer> buf = new net::IOBuffer(kSmallReadSize); | 3682 scoped_refptr<net::IOBuffer> buf(new net::IOBuffer(kSmallReadSize)); |
| 3683 rv = trans->Read(buf, kSmallReadSize, &read_callback); | 3683 rv = trans->Read(buf, kSmallReadSize, &read_callback); |
| 3684 if (rv > 0) { | 3684 if (rv > 0) { |
| 3685 EXPECT_EQ(kSmallReadSize, rv); | 3685 EXPECT_EQ(kSmallReadSize, rv); |
| 3686 content.append(buf->data(), rv); | 3686 content.append(buf->data(), rv); |
| 3687 } else if (rv < 0) { | 3687 } else if (rv < 0) { |
| 3688 FAIL() << "Unexpected read error: " << rv; | 3688 FAIL() << "Unexpected read error: " << rv; |
| 3689 } | 3689 } |
| 3690 reads_completed++; | 3690 reads_completed++; |
| 3691 } while (rv > 0); | 3691 } while (rv > 0); |
| 3692 | 3692 |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3761 out.response_info = *response; // Make a copy so we can verify. | 3761 out.response_info = *response; // Make a copy so we can verify. |
| 3762 | 3762 |
| 3763 // Read Data | 3763 // Read Data |
| 3764 TestCompletionCallback read_callback; | 3764 TestCompletionCallback read_callback; |
| 3765 | 3765 |
| 3766 std::string content; | 3766 std::string content; |
| 3767 int reads_completed = 0; | 3767 int reads_completed = 0; |
| 3768 do { | 3768 do { |
| 3769 // Read small chunks at a time. | 3769 // Read small chunks at a time. |
| 3770 const int kSmallReadSize = 14; | 3770 const int kSmallReadSize = 14; |
| 3771 scoped_refptr<net::IOBuffer> buf = new net::IOBuffer(kSmallReadSize); | 3771 scoped_refptr<net::IOBuffer> buf(new net::IOBuffer(kSmallReadSize)); |
| 3772 rv = trans->Read(buf, kSmallReadSize, &read_callback); | 3772 rv = trans->Read(buf, kSmallReadSize, &read_callback); |
| 3773 if (rv == net::ERR_IO_PENDING) { | 3773 if (rv == net::ERR_IO_PENDING) { |
| 3774 data->CompleteRead(); | 3774 data->CompleteRead(); |
| 3775 rv = read_callback.WaitForResult(); | 3775 rv = read_callback.WaitForResult(); |
| 3776 } | 3776 } |
| 3777 if (rv > 0) { | 3777 if (rv > 0) { |
| 3778 content.append(buf->data(), rv); | 3778 content.append(buf->data(), rv); |
| 3779 } else if (rv < 0) { | 3779 } else if (rv < 0) { |
| 3780 // This test intentionally closes the connection, and will get an error. | 3780 // This test intentionally closes the connection, and will get an error. |
| 3781 EXPECT_EQ(ERR_CONNECTION_CLOSED, rv); | 3781 EXPECT_EQ(ERR_CONNECTION_CLOSED, rv); |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3837 EXPECT_TRUE(response->headers != NULL); | 3837 EXPECT_TRUE(response->headers != NULL); |
| 3838 EXPECT_TRUE(response->was_fetched_via_spdy); | 3838 EXPECT_TRUE(response->was_fetched_via_spdy); |
| 3839 out.status_line = response->headers->GetStatusLine(); | 3839 out.status_line = response->headers->GetStatusLine(); |
| 3840 out.response_info = *response; // Make a copy so we can verify. | 3840 out.response_info = *response; // Make a copy so we can verify. |
| 3841 | 3841 |
| 3842 // Read Data | 3842 // Read Data |
| 3843 TestCompletionCallback read_callback; | 3843 TestCompletionCallback read_callback; |
| 3844 | 3844 |
| 3845 do { | 3845 do { |
| 3846 const int kReadSize = 256; | 3846 const int kReadSize = 256; |
| 3847 scoped_refptr<net::IOBuffer> buf = new net::IOBuffer(kReadSize); | 3847 scoped_refptr<net::IOBuffer> buf(new net::IOBuffer(kReadSize)); |
| 3848 rv = trans->Read(buf, kReadSize, &read_callback); | 3848 rv = trans->Read(buf, kReadSize, &read_callback); |
| 3849 if (rv == net::ERR_IO_PENDING) { | 3849 if (rv == net::ERR_IO_PENDING) { |
| 3850 // Complete the read now, which causes buffering to start. | 3850 // Complete the read now, which causes buffering to start. |
| 3851 data->CompleteRead(); | 3851 data->CompleteRead(); |
| 3852 // Destroy the transaction, causing the stream to get cancelled | 3852 // Destroy the transaction, causing the stream to get cancelled |
| 3853 // and orphaning the buffered IO task. | 3853 // and orphaning the buffered IO task. |
| 3854 helper.ResetTrans(); | 3854 helper.ResetTrans(); |
| 3855 break; | 3855 break; |
| 3856 } | 3856 } |
| 3857 // We shouldn't get here in this test. | 3857 // We shouldn't get here in this test. |
| (...skipping 517 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4375 NOTREACHED(); | 4375 NOTREACHED(); |
| 4376 } | 4376 } |
| 4377 | 4377 |
| 4378 // Create another request to www.google.com, but this time through a proxy. | 4378 // Create another request to www.google.com, but this time through a proxy. |
| 4379 HttpRequestInfo request_proxy; | 4379 HttpRequestInfo request_proxy; |
| 4380 request_proxy.method = "GET"; | 4380 request_proxy.method = "GET"; |
| 4381 request_proxy.url = GURL("http://www.google.com/foo.dat"); | 4381 request_proxy.url = GURL("http://www.google.com/foo.dat"); |
| 4382 request_proxy.load_flags = 0; | 4382 request_proxy.load_flags = 0; |
| 4383 scoped_ptr<SpdySessionDependencies> ssd_proxy(new SpdySessionDependencies()); | 4383 scoped_ptr<SpdySessionDependencies> ssd_proxy(new SpdySessionDependencies()); |
| 4384 // Ensure that this transaction uses the same SpdySessionPool. | 4384 // Ensure that this transaction uses the same SpdySessionPool. |
| 4385 scoped_refptr<HttpNetworkSession> session_proxy = | 4385 scoped_refptr<HttpNetworkSession> session_proxy( |
| 4386 SpdySessionDependencies::SpdyCreateSession(ssd_proxy.get()); | 4386 SpdySessionDependencies::SpdyCreateSession(ssd_proxy.get())); |
| 4387 NormalSpdyTransactionHelper helper_proxy(request_proxy, | 4387 NormalSpdyTransactionHelper helper_proxy(request_proxy, |
| 4388 BoundNetLog(), GetParam()); | 4388 BoundNetLog(), GetParam()); |
| 4389 HttpNetworkSessionPeer session_peer(session_proxy); | 4389 HttpNetworkSessionPeer session_peer(session_proxy); |
| 4390 session_peer.SetProxyService( | 4390 session_peer.SetProxyService( |
| 4391 ProxyService::CreateFixedFromPacResult("PROXY myproxy:70")); | 4391 ProxyService::CreateFixedFromPacResult("PROXY myproxy:70")); |
| 4392 helper_proxy.session_deps().swap(ssd_proxy); | 4392 helper_proxy.session_deps().swap(ssd_proxy); |
| 4393 helper_proxy.SetSession(session_proxy); | 4393 helper_proxy.SetSession(session_proxy); |
| 4394 helper_proxy.RunPreTestSetup(); | 4394 helper_proxy.RunPreTestSetup(); |
| 4395 helper_proxy.AddData(data_proxy.get()); | 4395 helper_proxy.AddData(data_proxy.get()); |
| 4396 | 4396 |
| (...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4627 // TODO(cbentzel): This is actually the same response object as before, but | 4627 // TODO(cbentzel): This is actually the same response object as before, but |
| 4628 // data has changed. | 4628 // data has changed. |
| 4629 const HttpResponseInfo* const response_restart = trans->GetResponseInfo(); | 4629 const HttpResponseInfo* const response_restart = trans->GetResponseInfo(); |
| 4630 ASSERT_TRUE(response_restart != NULL); | 4630 ASSERT_TRUE(response_restart != NULL); |
| 4631 ASSERT_TRUE(response_restart->headers != NULL); | 4631 ASSERT_TRUE(response_restart->headers != NULL); |
| 4632 EXPECT_EQ(200, response_restart->headers->response_code()); | 4632 EXPECT_EQ(200, response_restart->headers->response_code()); |
| 4633 EXPECT_TRUE(response_restart->auth_challenge.get() == NULL); | 4633 EXPECT_TRUE(response_restart->auth_challenge.get() == NULL); |
| 4634 } | 4634 } |
| 4635 | 4635 |
| 4636 } // namespace net | 4636 } // namespace net |
| OLD | NEW |