| Index: net/spdy/spdy_network_transaction_unittest.cc
|
| diff --git a/net/spdy/spdy_network_transaction_unittest.cc b/net/spdy/spdy_network_transaction_unittest.cc
|
| index 579869323647a6c1453cbae9b169b12c92418c09..3c62019151eca6482accb69d3ab56e9f98f3c3f8 100644
|
| --- a/net/spdy/spdy_network_transaction_unittest.cc
|
| +++ b/net/spdy/spdy_network_transaction_unittest.cc
|
| @@ -101,7 +101,7 @@ class SpdyNetworkTransactionTest : public ::testing::Test {
|
| NormalSpdyTransactionHelper(
|
| const HttpRequestInfo& request,
|
| RequestPriority priority,
|
| - const BoundNetLog& log,
|
| + const NetLogWithSource& log,
|
| std::unique_ptr<SpdySessionDependencies> session_deps)
|
| : request_(request),
|
| priority_(priority),
|
| @@ -253,7 +253,7 @@ class SpdyNetworkTransactionTest : public ::testing::Test {
|
| TestCompletionCallback callback_;
|
| std::unique_ptr<HttpNetworkTransaction> trans_;
|
| DataVector data_vector_;
|
| - const BoundNetLog log_;
|
| + const NetLogWithSource log_;
|
| };
|
|
|
| void ConnectStatusHelperWithExpectedStatus(const MockRead& status,
|
| @@ -425,7 +425,7 @@ class SpdyNetworkTransactionTest : public ::testing::Test {
|
| const GURL& url = helper.request().url;
|
| SpdySessionKey key(HostPortPair::FromURL(url), ProxyServer::Direct(),
|
| PRIVACY_MODE_DISABLED);
|
| - BoundNetLog log;
|
| + NetLogWithSource log;
|
| HttpNetworkSession* session = helper.session();
|
| base::WeakPtr<SpdySession> spdy_session =
|
| session->spdy_session_pool()->FindAvailableSession(key, url, log);
|
| @@ -439,7 +439,7 @@ class SpdyNetworkTransactionTest : public ::testing::Test {
|
| HttpResponseInfo* push_response,
|
| const std::string& expected) {
|
| NormalSpdyTransactionHelper helper(CreateGetRequest(), DEFAULT_PRIORITY,
|
| - BoundNetLog(), NULL);
|
| + NetLogWithSource(), NULL);
|
| helper.RunPreTestSetup();
|
| helper.AddData(data);
|
|
|
| @@ -447,15 +447,15 @@ class SpdyNetworkTransactionTest : public ::testing::Test {
|
|
|
| // Start the transaction with basic parameters.
|
| TestCompletionCallback callback;
|
| - int rv = trans->Start(
|
| - &CreateGetRequest(), callback.callback(), BoundNetLog());
|
| + int rv = trans->Start(&CreateGetRequest(), callback.callback(),
|
| + NetLogWithSource());
|
| EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
|
| rv = callback.WaitForResult();
|
|
|
| // Request the pushed path.
|
| HttpNetworkTransaction trans2(DEFAULT_PRIORITY, helper.session());
|
| rv = trans2.Start(&CreateGetPushRequest(), callback.callback(),
|
| - BoundNetLog());
|
| + NetLogWithSource());
|
| EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
|
| base::RunLoop().RunUntilIdle();
|
|
|
| @@ -511,7 +511,7 @@ class SpdyNetworkTransactionTest : public ::testing::Test {
|
| request.method = "GET";
|
| request.url = url;
|
| request.load_flags = 0;
|
| - int rv = trans.Start(&request, callback.callback(), BoundNetLog());
|
| + int rv = trans.Start(&request, callback.callback(), NetLogWithSource());
|
| EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
|
| callback.WaitForResult();
|
| }
|
| @@ -565,7 +565,7 @@ TEST_F(SpdyNetworkTransactionTest, Get) {
|
|
|
| SequencedSocketData data(reads, arraysize(reads), writes, arraysize(writes));
|
| NormalSpdyTransactionHelper helper(CreateGetRequest(), DEFAULT_PRIORITY,
|
| - BoundNetLog(), NULL);
|
| + NetLogWithSource(), NULL);
|
| helper.RunToCompletion(&data);
|
| TransactionHelperResult out = helper.output();
|
| EXPECT_THAT(out.rv, IsOk());
|
| @@ -620,7 +620,7 @@ TEST_F(SpdyNetworkTransactionTest, GetAtEachPriority) {
|
| arraysize(writes));
|
| HttpRequestInfo http_req = CreateGetRequest();
|
|
|
| - NormalSpdyTransactionHelper helper(http_req, p, BoundNetLog(), NULL);
|
| + NormalSpdyTransactionHelper helper(http_req, p, NetLogWithSource(), NULL);
|
| helper.RunToCompletion(&data);
|
| TransactionHelperResult out = helper.output();
|
| EXPECT_THAT(out.rv, IsOk());
|
| @@ -676,10 +676,10 @@ TEST_F(SpdyNetworkTransactionTest, ThreeGets) {
|
| SequencedSocketData data_placeholder1(NULL, 0, NULL, 0);
|
| SequencedSocketData data_placeholder2(NULL, 0, NULL, 0);
|
|
|
| - BoundNetLog log;
|
| + NetLogWithSource log;
|
| TransactionHelperResult out;
|
| NormalSpdyTransactionHelper helper(CreateGetRequest(), DEFAULT_PRIORITY,
|
| - BoundNetLog(), NULL);
|
| + NetLogWithSource(), NULL);
|
| helper.RunPreTestSetup();
|
| helper.AddData(&data);
|
| // We require placeholder data because three get requests are sent out at
|
| @@ -756,10 +756,10 @@ TEST_F(SpdyNetworkTransactionTest, TwoGetsLateBinding) {
|
| SequencedSocketData data_placeholder(NULL, 0, NULL, 0);
|
| data_placeholder.set_connect_data(never_finishing_connect);
|
|
|
| - BoundNetLog log;
|
| + NetLogWithSource log;
|
| TransactionHelperResult out;
|
| NormalSpdyTransactionHelper helper(CreateGetRequest(), DEFAULT_PRIORITY,
|
| - BoundNetLog(), NULL);
|
| + NetLogWithSource(), NULL);
|
| helper.RunPreTestSetup();
|
| helper.AddData(&data);
|
| // We require placeholder data because two requests are sent out at
|
| @@ -838,10 +838,10 @@ TEST_F(SpdyNetworkTransactionTest, TwoGetsLateBindingFromPreconnect) {
|
| SequencedSocketData data_placeholder(NULL, 0, NULL, 0);
|
| data_placeholder.set_connect_data(never_finishing_connect);
|
|
|
| - BoundNetLog log;
|
| + NetLogWithSource log;
|
| TransactionHelperResult out;
|
| NormalSpdyTransactionHelper helper(CreateGetRequest(), DEFAULT_PRIORITY,
|
| - BoundNetLog(), NULL);
|
| + NetLogWithSource(), NULL);
|
| helper.RunPreTestSetup();
|
| helper.AddData(&preconnect_data);
|
| // We require placeholder data because 3 connections are attempted (first is
|
| @@ -954,11 +954,11 @@ TEST_F(SpdyNetworkTransactionTest, ThreeGetsWithMaxConcurrent) {
|
|
|
| SequencedSocketData data(reads, arraysize(reads), writes, arraysize(writes));
|
|
|
| - BoundNetLog log;
|
| + NetLogWithSource log;
|
| TransactionHelperResult out;
|
| {
|
| NormalSpdyTransactionHelper helper(CreateGetRequest(), DEFAULT_PRIORITY,
|
| - BoundNetLog(), NULL);
|
| + NetLogWithSource(), NULL);
|
| helper.RunPreTestSetup();
|
| helper.AddData(&data);
|
| HttpNetworkTransaction trans1(DEFAULT_PRIORITY, helper.session());
|
| @@ -1088,10 +1088,10 @@ TEST_F(SpdyNetworkTransactionTest, FourGetsWithMaxConcurrentPriority) {
|
| MockRead(ASYNC, 0, 17), // EOF
|
| };
|
| SequencedSocketData data(reads, arraysize(reads), writes, arraysize(writes));
|
| - BoundNetLog log;
|
| + NetLogWithSource log;
|
| TransactionHelperResult out;
|
| NormalSpdyTransactionHelper helper(CreateGetRequest(), DEFAULT_PRIORITY,
|
| - BoundNetLog(), NULL);
|
| + NetLogWithSource(), NULL);
|
| helper.RunPreTestSetup();
|
| helper.AddData(&data);
|
|
|
| @@ -1210,10 +1210,10 @@ TEST_F(SpdyNetworkTransactionTest, ThreeGetsWithMaxConcurrentDelete) {
|
|
|
| SequencedSocketData data(reads, arraysize(reads), writes, arraysize(writes));
|
|
|
| - BoundNetLog log;
|
| + NetLogWithSource log;
|
| TransactionHelperResult out;
|
| NormalSpdyTransactionHelper helper(CreateGetRequest(), DEFAULT_PRIORITY,
|
| - BoundNetLog(), NULL);
|
| + NetLogWithSource(), NULL);
|
| helper.RunPreTestSetup();
|
| helper.AddData(&data);
|
| std::unique_ptr<HttpNetworkTransaction> trans1(
|
| @@ -1338,10 +1338,10 @@ TEST_F(SpdyNetworkTransactionTest, ThreeGetsWithMaxConcurrentSocketClose) {
|
| SequencedSocketData data(reads, arraysize(reads), writes, arraysize(writes));
|
| SequencedSocketData data_placeholder(NULL, 0, NULL, 0);
|
|
|
| - BoundNetLog log;
|
| + NetLogWithSource log;
|
| TransactionHelperResult out;
|
| NormalSpdyTransactionHelper helper(CreateGetRequest(), DEFAULT_PRIORITY,
|
| - BoundNetLog(), NULL);
|
| + NetLogWithSource(), NULL);
|
| helper.RunPreTestSetup();
|
| helper.AddData(&data);
|
| // We require placeholder data because three get requests are sent out, so
|
| @@ -1416,8 +1416,8 @@ TEST_F(SpdyNetworkTransactionTest, Put) {
|
| };
|
|
|
| SequencedSocketData data(reads, arraysize(reads), writes, arraysize(writes));
|
| - NormalSpdyTransactionHelper helper(request, DEFAULT_PRIORITY, BoundNetLog(),
|
| - NULL);
|
| + NormalSpdyTransactionHelper helper(request, DEFAULT_PRIORITY,
|
| + NetLogWithSource(), NULL);
|
| helper.RunToCompletion(&data);
|
| TransactionHelperResult out = helper.output();
|
|
|
| @@ -1448,8 +1448,8 @@ TEST_F(SpdyNetworkTransactionTest, Head) {
|
| };
|
|
|
| SequencedSocketData data(reads, arraysize(reads), writes, arraysize(writes));
|
| - NormalSpdyTransactionHelper helper(request, DEFAULT_PRIORITY, BoundNetLog(),
|
| - NULL);
|
| + NormalSpdyTransactionHelper helper(request, DEFAULT_PRIORITY,
|
| + NetLogWithSource(), NULL);
|
| helper.RunToCompletion(&data);
|
| TransactionHelperResult out = helper.output();
|
|
|
| @@ -1474,7 +1474,7 @@ TEST_F(SpdyNetworkTransactionTest, Post) {
|
|
|
| SequencedSocketData data(reads, arraysize(reads), writes, arraysize(writes));
|
| NormalSpdyTransactionHelper helper(CreatePostRequest(), DEFAULT_PRIORITY,
|
| - BoundNetLog(), NULL);
|
| + NetLogWithSource(), NULL);
|
| helper.RunToCompletion(&data);
|
| TransactionHelperResult out = helper.output();
|
| EXPECT_THAT(out.rv, IsOk());
|
| @@ -1499,7 +1499,7 @@ TEST_F(SpdyNetworkTransactionTest, FilePost) {
|
|
|
| SequencedSocketData data(reads, arraysize(reads), writes, arraysize(writes));
|
| NormalSpdyTransactionHelper helper(CreateFilePostRequest(), DEFAULT_PRIORITY,
|
| - BoundNetLog(), NULL);
|
| + NetLogWithSource(), NULL);
|
| helper.RunToCompletion(&data);
|
| TransactionHelperResult out = helper.output();
|
| EXPECT_THAT(out.rv, IsOk());
|
| @@ -1518,7 +1518,8 @@ TEST_F(SpdyNetworkTransactionTest, UnreadableFilePost) {
|
|
|
| SequencedSocketData data(reads, arraysize(reads), writes, arraysize(writes));
|
| NormalSpdyTransactionHelper helper(CreateUnreadableFilePostRequest(),
|
| - DEFAULT_PRIORITY, BoundNetLog(), NULL);
|
| + DEFAULT_PRIORITY, NetLogWithSource(),
|
| + NULL);
|
| helper.RunPreTestSetup();
|
| helper.AddData(&data);
|
| helper.RunDefaultTest();
|
| @@ -1544,8 +1545,8 @@ TEST_F(SpdyNetworkTransactionTest, ComplexPost) {
|
| };
|
|
|
| SequencedSocketData data(reads, arraysize(reads), writes, arraysize(writes));
|
| - NormalSpdyTransactionHelper helper(CreateComplexPostRequest(),
|
| - DEFAULT_PRIORITY, BoundNetLog(), NULL);
|
| + NormalSpdyTransactionHelper helper(
|
| + CreateComplexPostRequest(), DEFAULT_PRIORITY, NetLogWithSource(), NULL);
|
| helper.RunToCompletion(&data);
|
| TransactionHelperResult out = helper.output();
|
| EXPECT_THAT(out.rv, IsOk());
|
| @@ -1568,8 +1569,8 @@ TEST_F(SpdyNetworkTransactionTest, ChunkedPost) {
|
| };
|
|
|
| SequencedSocketData data(reads, arraysize(reads), writes, arraysize(writes));
|
| - NormalSpdyTransactionHelper helper(CreateChunkedPostRequest(),
|
| - DEFAULT_PRIORITY, BoundNetLog(), NULL);
|
| + NormalSpdyTransactionHelper helper(
|
| + CreateChunkedPostRequest(), DEFAULT_PRIORITY, NetLogWithSource(), NULL);
|
|
|
| // These chunks get merged into a single frame when being sent.
|
| const int kFirstChunkSize = kUploadDataSize/2;
|
| @@ -1603,8 +1604,8 @@ TEST_F(SpdyNetworkTransactionTest, DelayedChunkedPost) {
|
| };
|
|
|
| SequencedSocketData data(reads, arraysize(reads), writes, arraysize(writes));
|
| - NormalSpdyTransactionHelper helper(CreateChunkedPostRequest(),
|
| - DEFAULT_PRIORITY, BoundNetLog(), NULL);
|
| + NormalSpdyTransactionHelper helper(
|
| + CreateChunkedPostRequest(), DEFAULT_PRIORITY, NetLogWithSource(), NULL);
|
|
|
| upload_chunked_data_stream()->AppendData(kUploadData, kUploadDataSize, false);
|
|
|
| @@ -1660,8 +1661,8 @@ TEST_F(SpdyNetworkTransactionTest, NullPost) {
|
|
|
| SequencedSocketData data(reads, arraysize(reads), writes, arraysize(writes));
|
|
|
| - NormalSpdyTransactionHelper helper(request, DEFAULT_PRIORITY, BoundNetLog(),
|
| - NULL);
|
| + NormalSpdyTransactionHelper helper(request, DEFAULT_PRIORITY,
|
| + NetLogWithSource(), NULL);
|
| helper.RunToCompletion(&data);
|
| TransactionHelperResult out = helper.output();
|
| EXPECT_THAT(out.rv, IsOk());
|
| @@ -1701,8 +1702,8 @@ TEST_F(SpdyNetworkTransactionTest, EmptyPost) {
|
|
|
| SequencedSocketData data(reads, arraysize(reads), writes, arraysize(writes));
|
|
|
| - NormalSpdyTransactionHelper helper(request, DEFAULT_PRIORITY, BoundNetLog(),
|
| - NULL);
|
| + NormalSpdyTransactionHelper helper(request, DEFAULT_PRIORITY,
|
| + NetLogWithSource(), NULL);
|
| helper.RunToCompletion(&data);
|
| TransactionHelperResult out = helper.output();
|
| EXPECT_THAT(out.rv, IsOk());
|
| @@ -1726,8 +1727,8 @@ TEST_F(SpdyNetworkTransactionTest, ResponseBeforePostCompletes) {
|
| // Write the request headers, and read the complete response
|
| // while still waiting for chunked request data.
|
| SequencedSocketData data(reads, arraysize(reads), writes, arraysize(writes));
|
| - NormalSpdyTransactionHelper helper(CreateChunkedPostRequest(),
|
| - DEFAULT_PRIORITY, BoundNetLog(), NULL);
|
| + NormalSpdyTransactionHelper helper(
|
| + CreateChunkedPostRequest(), DEFAULT_PRIORITY, NetLogWithSource(), NULL);
|
| helper.RunPreTestSetup();
|
| helper.AddData(&data);
|
|
|
| @@ -1771,7 +1772,7 @@ TEST_F(SpdyNetworkTransactionTest, SocketWriteReturnsZero) {
|
|
|
| SequencedSocketData data(reads, arraysize(reads), writes, arraysize(writes));
|
| NormalSpdyTransactionHelper helper(CreateGetRequest(), DEFAULT_PRIORITY,
|
| - BoundNetLog(), NULL);
|
| + NetLogWithSource(), NULL);
|
| helper.RunPreTestSetup();
|
| helper.AddData(&data);
|
| helper.StartDefaultTest();
|
| @@ -1802,7 +1803,7 @@ TEST_F(SpdyNetworkTransactionTest, ResponseWithoutHeaders) {
|
| };
|
| SequencedSocketData data(reads, arraysize(reads), writes, arraysize(writes));
|
| NormalSpdyTransactionHelper helper(CreateGetRequest(), DEFAULT_PRIORITY,
|
| - BoundNetLog(), NULL);
|
| + NetLogWithSource(), NULL);
|
| helper.RunToCompletion(&data);
|
| TransactionHelperResult out = helper.output();
|
| EXPECT_THAT(out.rv, IsError(ERR_SPDY_PROTOCOL_ERROR));
|
| @@ -1830,14 +1831,15 @@ TEST_F(SpdyNetworkTransactionTest, ResponseWithTwoSynReplies) {
|
| SequencedSocketData data(reads, arraysize(reads), writes, arraysize(writes));
|
|
|
| NormalSpdyTransactionHelper helper(CreateGetRequest(), DEFAULT_PRIORITY,
|
| - BoundNetLog(), NULL);
|
| + NetLogWithSource(), NULL);
|
| helper.RunPreTestSetup();
|
| helper.AddData(&data);
|
|
|
| HttpNetworkTransaction* trans = helper.trans();
|
|
|
| TestCompletionCallback callback;
|
| - int rv = trans->Start(&helper.request(), callback.callback(), BoundNetLog());
|
| + int rv =
|
| + trans->Start(&helper.request(), callback.callback(), NetLogWithSource());
|
| EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
|
| rv = callback.WaitForResult();
|
| EXPECT_THAT(rv, IsOk());
|
| @@ -1875,7 +1877,7 @@ TEST_F(SpdyNetworkTransactionTest, ResetReplyWithTransferEncoding) {
|
|
|
| SequencedSocketData data(reads, arraysize(reads), writes, arraysize(writes));
|
| NormalSpdyTransactionHelper helper(CreateGetRequest(), DEFAULT_PRIORITY,
|
| - BoundNetLog(), NULL);
|
| + NetLogWithSource(), NULL);
|
| helper.RunToCompletion(&data);
|
| TransactionHelperResult out = helper.output();
|
| EXPECT_THAT(out.rv, IsError(ERR_SPDY_PROTOCOL_ERROR));
|
| @@ -1909,7 +1911,7 @@ TEST_F(SpdyNetworkTransactionTest, ResetPushWithTransferEncoding) {
|
|
|
| SequencedSocketData data(reads, arraysize(reads), writes, arraysize(writes));
|
| NormalSpdyTransactionHelper helper(CreateGetRequest(), DEFAULT_PRIORITY,
|
| - BoundNetLog(), NULL);
|
| + NetLogWithSource(), NULL);
|
| helper.RunToCompletion(&data);
|
| TransactionHelperResult out = helper.output();
|
| EXPECT_THAT(out.rv, IsOk());
|
| @@ -1942,14 +1944,14 @@ TEST_F(SpdyNetworkTransactionTest, CancelledTransaction) {
|
| writes, arraysize(writes));
|
|
|
| NormalSpdyTransactionHelper helper(CreateGetRequest(), DEFAULT_PRIORITY,
|
| - BoundNetLog(), NULL);
|
| + NetLogWithSource(), NULL);
|
| helper.RunPreTestSetup();
|
| helper.AddData(&data);
|
| HttpNetworkTransaction* trans = helper.trans();
|
|
|
| TestCompletionCallback callback;
|
| - int rv = trans->Start(
|
| - &CreateGetRequest(), callback.callback(), BoundNetLog());
|
| + int rv = trans->Start(&CreateGetRequest(), callback.callback(),
|
| + NetLogWithSource());
|
| EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
|
| helper.ResetTrans(); // Cancel the transaction.
|
|
|
| @@ -1978,15 +1980,15 @@ TEST_F(SpdyNetworkTransactionTest, CancelledTransactionSendRst) {
|
| SequencedSocketData data(reads, arraysize(reads), writes, arraysize(writes));
|
|
|
| NormalSpdyTransactionHelper helper(CreateGetRequest(), DEFAULT_PRIORITY,
|
| - BoundNetLog(), NULL);
|
| + NetLogWithSource(), NULL);
|
| helper.RunPreTestSetup();
|
| helper.AddData(&data);
|
| HttpNetworkTransaction* trans = helper.trans();
|
|
|
| TestCompletionCallback callback;
|
|
|
| - int rv = trans->Start(
|
| - &CreateGetRequest(), callback.callback(), BoundNetLog());
|
| + int rv = trans->Start(&CreateGetRequest(), callback.callback(),
|
| + NetLogWithSource());
|
| EXPECT_THAT(callback.GetResult(rv), IsOk());
|
|
|
| helper.ResetTrans();
|
| @@ -2030,7 +2032,7 @@ TEST_F(SpdyNetworkTransactionTest, StartTransactionOnReadCallback) {
|
| arraysize(writes2));
|
|
|
| NormalSpdyTransactionHelper helper(CreateGetRequest(), DEFAULT_PRIORITY,
|
| - BoundNetLog(), NULL);
|
| + NetLogWithSource(), NULL);
|
| helper.RunPreTestSetup();
|
| helper.AddData(&data);
|
| helper.AddData(&data2);
|
| @@ -2038,7 +2040,8 @@ TEST_F(SpdyNetworkTransactionTest, StartTransactionOnReadCallback) {
|
|
|
| // Start the transaction with basic parameters.
|
| TestCompletionCallback callback;
|
| - int rv = trans->Start(&helper.request(), callback.callback(), BoundNetLog());
|
| + int rv =
|
| + trans->Start(&helper.request(), callback.callback(), NetLogWithSource());
|
| EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
|
| rv = callback.WaitForResult();
|
|
|
| @@ -2078,14 +2081,15 @@ TEST_F(SpdyNetworkTransactionTest, DeleteSessionOnReadCallback) {
|
| SequencedSocketData data(reads, arraysize(reads), writes, arraysize(writes));
|
|
|
| NormalSpdyTransactionHelper helper(CreateGetRequest(), DEFAULT_PRIORITY,
|
| - BoundNetLog(), NULL);
|
| + NetLogWithSource(), NULL);
|
| helper.RunPreTestSetup();
|
| helper.AddData(&data);
|
| HttpNetworkTransaction* trans = helper.trans();
|
|
|
| // Start the transaction with basic parameters.
|
| TestCompletionCallback callback;
|
| - int rv = trans->Start(&helper.request(), callback.callback(), BoundNetLog());
|
| + int rv =
|
| + trans->Start(&helper.request(), callback.callback(), NetLogWithSource());
|
| EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
|
| rv = callback.WaitForResult();
|
|
|
| @@ -2531,7 +2535,7 @@ TEST_F(SpdyNetworkTransactionTest, ServerPushServerAborted) {
|
|
|
| SequencedSocketData data(reads, arraysize(reads), writes, arraysize(writes));
|
| NormalSpdyTransactionHelper helper(CreateGetRequest(), DEFAULT_PRIORITY,
|
| - BoundNetLog(), NULL);
|
| + NetLogWithSource(), NULL);
|
|
|
| helper.RunPreTestSetup();
|
| helper.AddData(&data);
|
| @@ -2540,8 +2544,8 @@ TEST_F(SpdyNetworkTransactionTest, ServerPushServerAborted) {
|
|
|
| // Start the transaction with basic parameters.
|
| TestCompletionCallback callback;
|
| - int rv = trans->Start(
|
| - &CreateGetRequest(), callback.callback(), BoundNetLog());
|
| + int rv = trans->Start(&CreateGetRequest(), callback.callback(),
|
| + NetLogWithSource());
|
| EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
|
| rv = callback.WaitForResult();
|
| EXPECT_THAT(rv, IsOk());
|
| @@ -2724,7 +2728,7 @@ TEST_F(SpdyNetworkTransactionTest, ServerPushInvalidAssociatedStreamID0) {
|
|
|
| SequencedSocketData data(reads, arraysize(reads), writes, arraysize(writes));
|
| NormalSpdyTransactionHelper helper(CreateGetRequest(), DEFAULT_PRIORITY,
|
| - BoundNetLog(), NULL);
|
| + NetLogWithSource(), NULL);
|
|
|
| helper.RunPreTestSetup();
|
| helper.AddData(&data);
|
| @@ -2733,8 +2737,8 @@ TEST_F(SpdyNetworkTransactionTest, ServerPushInvalidAssociatedStreamID0) {
|
|
|
| // Start the transaction with basic parameters.
|
| TestCompletionCallback callback;
|
| - int rv = trans->Start(
|
| - &CreateGetRequest(), callback.callback(), BoundNetLog());
|
| + int rv = trans->Start(&CreateGetRequest(), callback.callback(),
|
| + NetLogWithSource());
|
| EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
|
| rv = callback.WaitForResult();
|
| EXPECT_THAT(rv, IsOk());
|
| @@ -2771,7 +2775,7 @@ TEST_F(SpdyNetworkTransactionTest, ServerPushInvalidAssociatedStreamID9) {
|
|
|
| SequencedSocketData data(reads, arraysize(reads), writes, arraysize(writes));
|
| NormalSpdyTransactionHelper helper(CreateGetRequest(), DEFAULT_PRIORITY,
|
| - BoundNetLog(), NULL);
|
| + NetLogWithSource(), NULL);
|
|
|
| helper.RunPreTestSetup();
|
| helper.AddData(&data);
|
| @@ -2780,8 +2784,8 @@ TEST_F(SpdyNetworkTransactionTest, ServerPushInvalidAssociatedStreamID9) {
|
|
|
| // Start the transaction with basic parameters.
|
| TestCompletionCallback callback;
|
| - int rv = trans->Start(
|
| - &CreateGetRequest(), callback.callback(), BoundNetLog());
|
| + int rv = trans->Start(&CreateGetRequest(), callback.callback(),
|
| + NetLogWithSource());
|
| EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
|
| rv = callback.WaitForResult();
|
| EXPECT_THAT(rv, IsOk());
|
| @@ -2821,7 +2825,7 @@ TEST_F(SpdyNetworkTransactionTest, ServerPushNoURL) {
|
|
|
| SequencedSocketData data(reads, arraysize(reads), writes, arraysize(writes));
|
| NormalSpdyTransactionHelper helper(CreateGetRequest(), DEFAULT_PRIORITY,
|
| - BoundNetLog(), NULL);
|
| + NetLogWithSource(), NULL);
|
|
|
| helper.RunPreTestSetup();
|
| helper.AddData(&data);
|
| @@ -2830,8 +2834,8 @@ TEST_F(SpdyNetworkTransactionTest, ServerPushNoURL) {
|
|
|
| // Start the transaction with basic parameters.
|
| TestCompletionCallback callback;
|
| - int rv = trans->Start(
|
| - &CreateGetRequest(), callback.callback(), BoundNetLog());
|
| + int rv = trans->Start(&CreateGetRequest(), callback.callback(),
|
| + NetLogWithSource());
|
| EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
|
| rv = callback.WaitForResult();
|
| EXPECT_THAT(rv, IsOk());
|
| @@ -2869,7 +2873,7 @@ TEST_F(SpdyNetworkTransactionTest, ServerPushOnPushedStream) {
|
|
|
| SequencedSocketData data(reads, arraysize(reads), writes, arraysize(writes));
|
| NormalSpdyTransactionHelper helper(CreateGetRequest(), DEFAULT_PRIORITY,
|
| - BoundNetLog(), nullptr);
|
| + NetLogWithSource(), nullptr);
|
| helper.RunToCompletion(&data);
|
| }
|
|
|
| @@ -2895,15 +2899,15 @@ TEST_F(SpdyNetworkTransactionTest, ServerPushOnClosedStream) {
|
|
|
| SequencedSocketData data(reads, arraysize(reads), writes, arraysize(writes));
|
| NormalSpdyTransactionHelper helper(CreateGetRequest(), DEFAULT_PRIORITY,
|
| - BoundNetLog(), nullptr);
|
| + NetLogWithSource(), nullptr);
|
| helper.RunPreTestSetup();
|
| helper.AddData(&data);
|
|
|
| HttpNetworkTransaction* trans = helper.trans();
|
|
|
| TestCompletionCallback callback;
|
| - int rv =
|
| - trans->Start(&CreateGetRequest(), callback.callback(), BoundNetLog());
|
| + int rv = trans->Start(&CreateGetRequest(), callback.callback(),
|
| + NetLogWithSource());
|
| rv = callback.GetResult(rv);
|
| EXPECT_THAT(rv, IsOk());
|
| HttpResponseInfo response = *trans->GetResponseInfo();
|
| @@ -2945,14 +2949,14 @@ TEST_F(SpdyNetworkTransactionTest, ServerPushOnClosedPushedStream) {
|
|
|
| SequencedSocketData data(reads, arraysize(reads), writes, arraysize(writes));
|
| NormalSpdyTransactionHelper helper(CreateGetRequest(), DEFAULT_PRIORITY,
|
| - BoundNetLog(), nullptr);
|
| + NetLogWithSource(), nullptr);
|
| helper.RunPreTestSetup();
|
| helper.AddData(&data);
|
|
|
| HttpNetworkTransaction* trans1 = helper.trans();
|
| TestCompletionCallback callback1;
|
| - int rv =
|
| - trans1->Start(&CreateGetRequest(), callback1.callback(), BoundNetLog());
|
| + int rv = trans1->Start(&CreateGetRequest(), callback1.callback(),
|
| + NetLogWithSource());
|
| rv = callback1.GetResult(rv);
|
| EXPECT_THAT(rv, IsOk());
|
| HttpResponseInfo response = *trans1->GetResponseInfo();
|
| @@ -2962,7 +2966,7 @@ TEST_F(SpdyNetworkTransactionTest, ServerPushOnClosedPushedStream) {
|
| HttpNetworkTransaction trans2(DEFAULT_PRIORITY, helper.session());
|
| TestCompletionCallback callback2;
|
| rv = trans2.Start(&CreateGetPushRequest(), callback2.callback(),
|
| - BoundNetLog());
|
| + NetLogWithSource());
|
| rv = callback2.GetResult(rv);
|
| EXPECT_THAT(rv, IsOk());
|
| response = *trans2.GetResponseInfo();
|
| @@ -3033,7 +3037,7 @@ TEST_F(SpdyNetworkTransactionTest, ResponseHeaders) {
|
| SequencedSocketData data(reads, arraysize(reads), writes,
|
| arraysize(writes));
|
| NormalSpdyTransactionHelper helper(CreateGetRequest(), DEFAULT_PRIORITY,
|
| - BoundNetLog(), NULL);
|
| + NetLogWithSource(), NULL);
|
| helper.RunToCompletion(&data);
|
| TransactionHelperResult out = helper.output();
|
|
|
| @@ -3139,8 +3143,8 @@ TEST_F(SpdyNetworkTransactionTest, ResponseHeadersVary) {
|
|
|
| SequencedSocketData data(reads, arraysize(reads), writes,
|
| arraysize(writes));
|
| - NormalSpdyTransactionHelper helper(request, DEFAULT_PRIORITY, BoundNetLog(),
|
| - NULL);
|
| + NormalSpdyTransactionHelper helper(request, DEFAULT_PRIORITY,
|
| + NetLogWithSource(), NULL);
|
| helper.RunToCompletion(&data);
|
| TransactionHelperResult out = helper.output();
|
|
|
| @@ -3214,7 +3218,7 @@ TEST_F(SpdyNetworkTransactionTest, InvalidResponseHeaders) {
|
| SequencedSocketData data(reads, arraysize(reads), writes,
|
| arraysize(writes));
|
| NormalSpdyTransactionHelper helper(CreateGetRequest(), DEFAULT_PRIORITY,
|
| - BoundNetLog(), NULL);
|
| + NetLogWithSource(), NULL);
|
| helper.RunToCompletion(&data);
|
| TransactionHelperResult out = helper.output();
|
| EXPECT_THAT(out.rv, IsError(ERR_SPDY_PROTOCOL_ERROR));
|
| @@ -3243,7 +3247,7 @@ TEST_F(SpdyNetworkTransactionTest, CorruptFrameSessionError) {
|
|
|
| SequencedSocketData data(reads, arraysize(reads), writes, arraysize(writes));
|
| NormalSpdyTransactionHelper helper(CreateGetRequest(), DEFAULT_PRIORITY,
|
| - BoundNetLog(), NULL);
|
| + NetLogWithSource(), NULL);
|
| helper.RunToCompletion(&data);
|
| TransactionHelperResult out = helper.output();
|
| EXPECT_THAT(out.rv, IsError(ERR_SPDY_COMPRESSION_ERROR));
|
| @@ -3263,7 +3267,7 @@ TEST_F(SpdyNetworkTransactionTest, GoAwayOnDecompressionFailure) {
|
|
|
| SequencedSocketData data(reads, arraysize(reads), writes, arraysize(writes));
|
| NormalSpdyTransactionHelper helper(CreateGetRequest(), DEFAULT_PRIORITY,
|
| - BoundNetLog(), NULL);
|
| + NetLogWithSource(), NULL);
|
| helper.RunToCompletion(&data);
|
| TransactionHelperResult out = helper.output();
|
| EXPECT_THAT(out.rv, IsError(ERR_SPDY_COMPRESSION_ERROR));
|
| @@ -3285,7 +3289,7 @@ TEST_F(SpdyNetworkTransactionTest, GoAwayOnFrameSizeError) {
|
|
|
| SequencedSocketData data(reads, arraysize(reads), writes, arraysize(writes));
|
| NormalSpdyTransactionHelper helper(CreateGetRequest(), DEFAULT_PRIORITY,
|
| - BoundNetLog(), NULL);
|
| + NetLogWithSource(), NULL);
|
| helper.RunToCompletion(&data);
|
| TransactionHelperResult out = helper.output();
|
| EXPECT_THAT(out.rv, IsError(ERR_SPDY_FRAME_SIZE_ERROR));
|
| @@ -3309,7 +3313,7 @@ TEST_F(SpdyNetworkTransactionTest, WriteError) {
|
| SequencedSocketData data(reads, arraysize(reads), writes, arraysize(writes));
|
|
|
| NormalSpdyTransactionHelper helper(CreateGetRequest(), DEFAULT_PRIORITY,
|
| - BoundNetLog(), NULL);
|
| + NetLogWithSource(), NULL);
|
| helper.RunPreTestSetup();
|
| helper.AddData(&data);
|
| EXPECT_TRUE(helper.StartDefaultTest());
|
| @@ -3340,7 +3344,7 @@ TEST_F(SpdyNetworkTransactionTest, PartialWrite) {
|
|
|
| SequencedSocketData data(reads, arraysize(reads), writes.get(), kChunks);
|
| NormalSpdyTransactionHelper helper(CreateGetRequest(), DEFAULT_PRIORITY,
|
| - BoundNetLog(), NULL);
|
| + NetLogWithSource(), NULL);
|
| helper.RunToCompletion(&data);
|
| TransactionHelperResult out = helper.output();
|
| EXPECT_THAT(out.rv, IsOk());
|
| @@ -3469,12 +3473,12 @@ TEST_F(SpdyNetworkTransactionTest, BufferFull) {
|
| TestCompletionCallback callback;
|
|
|
| NormalSpdyTransactionHelper helper(CreateGetRequest(), DEFAULT_PRIORITY,
|
| - BoundNetLog(), NULL);
|
| + NetLogWithSource(), NULL);
|
| helper.RunPreTestSetup();
|
| helper.AddData(&data);
|
| HttpNetworkTransaction* trans = helper.trans();
|
| - int rv = trans->Start(
|
| - &CreateGetRequest(), callback.callback(), BoundNetLog());
|
| + int rv = trans->Start(&CreateGetRequest(), callback.callback(),
|
| + NetLogWithSource());
|
| EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
|
|
|
| TransactionHelperResult out = helper.output();
|
| @@ -3552,14 +3556,14 @@ TEST_F(SpdyNetworkTransactionTest, Buffering) {
|
| SequencedSocketData data(reads, arraysize(reads), writes, arraysize(writes));
|
|
|
| NormalSpdyTransactionHelper helper(CreateGetRequest(), DEFAULT_PRIORITY,
|
| - BoundNetLog(), NULL);
|
| + NetLogWithSource(), NULL);
|
| helper.RunPreTestSetup();
|
| helper.AddData(&data);
|
| HttpNetworkTransaction* trans = helper.trans();
|
|
|
| TestCompletionCallback callback;
|
| - int rv = trans->Start(
|
| - &CreateGetRequest(), callback.callback(), BoundNetLog());
|
| + int rv = trans->Start(&CreateGetRequest(), callback.callback(),
|
| + NetLogWithSource());
|
| EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
|
|
|
| TransactionHelperResult out = helper.output();
|
| @@ -3638,14 +3642,14 @@ TEST_F(SpdyNetworkTransactionTest, BufferedAll) {
|
| SequencedSocketData data(reads, arraysize(reads), writes, arraysize(writes));
|
|
|
| NormalSpdyTransactionHelper helper(CreateGetRequest(), DEFAULT_PRIORITY,
|
| - BoundNetLog(), NULL);
|
| + NetLogWithSource(), NULL);
|
| helper.RunPreTestSetup();
|
| helper.AddData(&data);
|
| HttpNetworkTransaction* trans = helper.trans();
|
|
|
| TestCompletionCallback callback;
|
| - int rv = trans->Start(
|
| - &CreateGetRequest(), callback.callback(), BoundNetLog());
|
| + int rv = trans->Start(&CreateGetRequest(), callback.callback(),
|
| + NetLogWithSource());
|
| EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
|
|
|
| TransactionHelperResult out = helper.output();
|
| @@ -3720,15 +3724,15 @@ TEST_F(SpdyNetworkTransactionTest, BufferedClosed) {
|
| SequencedSocketData data(reads, arraysize(reads), writes, arraysize(writes));
|
|
|
| NormalSpdyTransactionHelper helper(CreateGetRequest(), DEFAULT_PRIORITY,
|
| - BoundNetLog(), NULL);
|
| + NetLogWithSource(), NULL);
|
| helper.RunPreTestSetup();
|
| helper.AddData(&data);
|
| HttpNetworkTransaction* trans = helper.trans();
|
|
|
| TestCompletionCallback callback;
|
|
|
| - int rv = trans->Start(
|
| - &CreateGetRequest(), callback.callback(), BoundNetLog());
|
| + int rv = trans->Start(&CreateGetRequest(), callback.callback(),
|
| + NetLogWithSource());
|
| EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
|
|
|
| TransactionHelperResult out = helper.output();
|
| @@ -3799,14 +3803,14 @@ TEST_F(SpdyNetworkTransactionTest, BufferedCancelled) {
|
| SequencedSocketData data(reads, arraysize(reads), writes, arraysize(writes));
|
|
|
| NormalSpdyTransactionHelper helper(CreateGetRequest(), DEFAULT_PRIORITY,
|
| - BoundNetLog(), NULL);
|
| + NetLogWithSource(), NULL);
|
| helper.RunPreTestSetup();
|
| helper.AddData(&data);
|
| HttpNetworkTransaction* trans = helper.trans();
|
| TestCompletionCallback callback;
|
|
|
| - int rv = trans->Start(
|
| - &CreateGetRequest(), callback.callback(), BoundNetLog());
|
| + int rv = trans->Start(&CreateGetRequest(), callback.callback(),
|
| + NetLogWithSource());
|
| EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
|
|
|
| TransactionHelperResult out = helper.output();
|
| @@ -3854,7 +3858,7 @@ TEST_F(SpdyNetworkTransactionTest, GoAwayWithActiveStream) {
|
|
|
| SequencedSocketData data(reads, arraysize(reads), writes, arraysize(writes));
|
| NormalSpdyTransactionHelper helper(CreateGetRequest(), DEFAULT_PRIORITY,
|
| - BoundNetLog(), NULL);
|
| + NetLogWithSource(), NULL);
|
| helper.AddData(&data);
|
| helper.RunToCompletion(&data);
|
| TransactionHelperResult out = helper.output();
|
| @@ -3874,7 +3878,7 @@ TEST_F(SpdyNetworkTransactionTest, CloseWithActiveStream) {
|
| SequencedSocketData data(reads, arraysize(reads), writes, arraysize(writes));
|
|
|
| NormalSpdyTransactionHelper helper(CreateGetRequest(), DEFAULT_PRIORITY,
|
| - BoundNetLog(), NULL);
|
| + NetLogWithSource(), NULL);
|
| helper.RunPreTestSetup();
|
| helper.AddData(&data);
|
| helper.StartDefaultTest();
|
| @@ -3899,8 +3903,8 @@ TEST_F(SpdyNetworkTransactionTest, HTTP11RequiredRetry) {
|
| request.method = "GET";
|
| request.url = default_url_;
|
| // Do not force SPDY so that second socket can negotiate HTTP/1.1.
|
| - NormalSpdyTransactionHelper helper(request, DEFAULT_PRIORITY, BoundNetLog(),
|
| - nullptr);
|
| + NormalSpdyTransactionHelper helper(request, DEFAULT_PRIORITY,
|
| + NetLogWithSource(), nullptr);
|
|
|
| // First socket: HTTP/2 request rejected with HTTP_1_1_REQUIRED.
|
| SpdyHeaderBlock headers(spdy_util_.ConstructGetHeaderBlock(kDefaultUrl));
|
| @@ -3978,8 +3982,8 @@ TEST_F(SpdyNetworkTransactionTest, HTTP11RequiredProxyRetry) {
|
| auto session_deps = base::MakeUnique<SpdySessionDependencies>(
|
| ProxyService::CreateFixedFromPacResult("HTTPS myproxy:70"));
|
| // Do not force SPDY so that second socket can negotiate HTTP/1.1.
|
| - NormalSpdyTransactionHelper helper(request, DEFAULT_PRIORITY, BoundNetLog(),
|
| - std::move(session_deps));
|
| + NormalSpdyTransactionHelper helper(
|
| + request, DEFAULT_PRIORITY, NetLogWithSource(), std::move(session_deps));
|
|
|
| // First socket: HTTP/2 CONNECT rejected with HTTP_1_1_REQUIRED.
|
| SpdySerializedFrame req(spdy_util_.ConstructSpdyConnect(
|
| @@ -4068,7 +4072,8 @@ TEST_F(SpdyNetworkTransactionTest, ProxyConnect) {
|
| auto session_deps = base::MakeUnique<SpdySessionDependencies>(
|
| ProxyService::CreateFixedFromPacResult("PROXY myproxy:70"));
|
| NormalSpdyTransactionHelper helper(CreateGetRequest(), DEFAULT_PRIORITY,
|
| - BoundNetLog(), std::move(session_deps));
|
| + NetLogWithSource(),
|
| + std::move(session_deps));
|
| helper.RunPreTestSetup();
|
| HttpNetworkTransaction* trans = helper.trans();
|
|
|
| @@ -4097,8 +4102,8 @@ TEST_F(SpdyNetworkTransactionTest, ProxyConnect) {
|
| helper.AddData(data.get());
|
| TestCompletionCallback callback;
|
|
|
| - int rv = trans->Start(
|
| - &CreateGetRequest(), callback.callback(), BoundNetLog());
|
| + int rv = trans->Start(&CreateGetRequest(), callback.callback(),
|
| + NetLogWithSource());
|
| EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
|
|
|
| rv = callback.WaitForResult();
|
| @@ -4128,7 +4133,8 @@ TEST_F(SpdyNetworkTransactionTest, DirectConnectProxyReconnect) {
|
| // When setting up the first transaction, we store the SpdySessionPool so that
|
| // we can use the same pool in the second transaction.
|
| NormalSpdyTransactionHelper helper(CreateGetRequest(), DEFAULT_PRIORITY,
|
| - BoundNetLog(), std::move(session_deps));
|
| + NetLogWithSource(),
|
| + std::move(session_deps));
|
|
|
| SpdySessionPool* spdy_session_pool = helper.session()->spdy_session_pool();
|
| helper.RunPreTestSetup();
|
| @@ -4152,8 +4158,8 @@ TEST_F(SpdyNetworkTransactionTest, DirectConnectProxyReconnect) {
|
|
|
| TestCompletionCallback callback;
|
| TransactionHelperResult out;
|
| - out.rv = trans->Start(
|
| - &CreateGetRequest(), callback.callback(), BoundNetLog());
|
| + out.rv = trans->Start(&CreateGetRequest(), callback.callback(),
|
| + NetLogWithSource());
|
|
|
| EXPECT_EQ(out.rv, ERR_IO_PENDING);
|
| out.rv = callback.WaitForResult();
|
| @@ -4214,15 +4220,15 @@ TEST_F(SpdyNetworkTransactionTest, DirectConnectProxyReconnect) {
|
| auto session_deps_proxy = base::MakeUnique<SpdySessionDependencies>(
|
| ProxyService::CreateFixedFromPacResult("PROXY myproxy:70"));
|
| NormalSpdyTransactionHelper helper_proxy(request_proxy, DEFAULT_PRIORITY,
|
| - BoundNetLog(),
|
| + NetLogWithSource(),
|
| std::move(session_deps_proxy));
|
| helper_proxy.RunPreTestSetup();
|
| helper_proxy.AddData(data_proxy.get());
|
|
|
| HttpNetworkTransaction* trans_proxy = helper_proxy.trans();
|
| TestCompletionCallback callback_proxy;
|
| - int rv = trans_proxy->Start(
|
| - &request_proxy, callback_proxy.callback(), BoundNetLog());
|
| + int rv = trans_proxy->Start(&request_proxy, callback_proxy.callback(),
|
| + NetLogWithSource());
|
| EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
|
| rv = callback_proxy.WaitForResult();
|
| EXPECT_EQ(0, rv);
|
| @@ -4284,7 +4290,7 @@ TEST_F(SpdyNetworkTransactionTest, VerifyRetryOnConnectionReset) {
|
| arraysize(writes2));
|
|
|
| NormalSpdyTransactionHelper helper(CreateGetRequest(), DEFAULT_PRIORITY,
|
| - BoundNetLog(), NULL);
|
| + NetLogWithSource(), NULL);
|
| helper.AddData(&data1);
|
| helper.AddData(&data2);
|
| helper.RunPreTestSetup();
|
| @@ -4293,8 +4299,8 @@ TEST_F(SpdyNetworkTransactionTest, VerifyRetryOnConnectionReset) {
|
| HttpNetworkTransaction trans(DEFAULT_PRIORITY, helper.session());
|
|
|
| TestCompletionCallback callback;
|
| - int rv =
|
| - trans.Start(&helper.request(), callback.callback(), BoundNetLog());
|
| + int rv = trans.Start(&helper.request(), callback.callback(),
|
| + NetLogWithSource());
|
| EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
|
| // On the second transaction, we trigger the RST.
|
| if (i == 1) {
|
| @@ -4370,8 +4376,8 @@ TEST_F(SpdyNetworkTransactionTest, SpdyBasicAuth) {
|
| SequencedSocketData data(spdy_reads, arraysize(spdy_reads), spdy_writes,
|
| arraysize(spdy_writes));
|
| HttpRequestInfo request(CreateGetRequest());
|
| - NormalSpdyTransactionHelper helper(request, DEFAULT_PRIORITY, BoundNetLog(),
|
| - NULL);
|
| + NormalSpdyTransactionHelper helper(request, DEFAULT_PRIORITY,
|
| + NetLogWithSource(), NULL);
|
|
|
| helper.RunPreTestSetup();
|
| helper.AddData(&data);
|
| @@ -4504,7 +4510,7 @@ TEST_F(SpdyNetworkTransactionTest, ServerPushClaimBeforeHeaders) {
|
| SequencedSocketData data(reads, arraysize(reads), writes, arraysize(writes));
|
|
|
| NormalSpdyTransactionHelper helper(CreateGetRequest(), DEFAULT_PRIORITY,
|
| - BoundNetLog(), NULL);
|
| + NetLogWithSource(), NULL);
|
| helper.AddData(&data);
|
| helper.RunPreTestSetup();
|
|
|
| @@ -4512,8 +4518,8 @@ TEST_F(SpdyNetworkTransactionTest, ServerPushClaimBeforeHeaders) {
|
|
|
| // Start the transaction.
|
| TestCompletionCallback callback;
|
| - int rv = trans->Start(
|
| - &CreateGetRequest(), callback.callback(), BoundNetLog());
|
| + int rv = trans->Start(&CreateGetRequest(), callback.callback(),
|
| + NetLogWithSource());
|
| EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
|
| // Run until we've received the primary HEADERS, the pushed HEADERS,
|
| // and the body of the primary stream, but before we've received the HEADERS
|
| @@ -4524,8 +4530,8 @@ TEST_F(SpdyNetworkTransactionTest, ServerPushClaimBeforeHeaders) {
|
| // Request the pushed path. At this point, we've received the push, but the
|
| // headers are not yet complete.
|
| HttpNetworkTransaction trans2(DEFAULT_PRIORITY, helper.session());
|
| - rv =
|
| - trans2.Start(&CreateGetPushRequest(), callback.callback(), BoundNetLog());
|
| + rv = trans2.Start(&CreateGetPushRequest(), callback.callback(),
|
| + NetLogWithSource());
|
| EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
|
| data.Resume();
|
| data.RunUntilPaused();
|
| @@ -4619,7 +4625,7 @@ TEST_F(SpdyNetworkTransactionTest, ServerPushWithTwoHeaderFrames) {
|
| SequencedSocketData data(reads, arraysize(reads), writes, arraysize(writes));
|
|
|
| NormalSpdyTransactionHelper helper(CreateGetRequest(), DEFAULT_PRIORITY,
|
| - BoundNetLog(), NULL);
|
| + NetLogWithSource(), NULL);
|
| helper.AddData(&data);
|
| helper.RunPreTestSetup();
|
|
|
| @@ -4627,8 +4633,8 @@ TEST_F(SpdyNetworkTransactionTest, ServerPushWithTwoHeaderFrames) {
|
|
|
| // Start the transaction.
|
| TestCompletionCallback callback;
|
| - int rv = trans->Start(
|
| - &CreateGetRequest(), callback.callback(), BoundNetLog());
|
| + int rv = trans->Start(&CreateGetRequest(), callback.callback(),
|
| + NetLogWithSource());
|
| EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
|
| // Run until we've received the primary HEADERS, the pushed HEADERS,
|
| // the first HEADERS frame, and the body of the primary stream, but before
|
| @@ -4639,8 +4645,8 @@ TEST_F(SpdyNetworkTransactionTest, ServerPushWithTwoHeaderFrames) {
|
| // Request the pushed path. At this point, we've received the push, but the
|
| // headers are not yet complete.
|
| HttpNetworkTransaction trans2(DEFAULT_PRIORITY, helper.session());
|
| - rv =
|
| - trans2.Start(&CreateGetPushRequest(), callback.callback(), BoundNetLog());
|
| + rv = trans2.Start(&CreateGetPushRequest(), callback.callback(),
|
| + NetLogWithSource());
|
| EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
|
| data.Resume();
|
| data.RunUntilPaused();
|
| @@ -4726,7 +4732,7 @@ TEST_F(SpdyNetworkTransactionTest, ServerPushWithNoStatusHeaderFrames) {
|
| SequencedSocketData data(reads, arraysize(reads), writes, arraysize(writes));
|
|
|
| NormalSpdyTransactionHelper helper(CreateGetRequest(), DEFAULT_PRIORITY,
|
| - BoundNetLog(), NULL);
|
| + NetLogWithSource(), NULL);
|
| helper.AddData(&data);
|
| helper.RunPreTestSetup();
|
|
|
| @@ -4734,8 +4740,8 @@ TEST_F(SpdyNetworkTransactionTest, ServerPushWithNoStatusHeaderFrames) {
|
|
|
| // Start the transaction.
|
| TestCompletionCallback callback;
|
| - int rv = trans->Start(
|
| - &CreateGetRequest(), callback.callback(), BoundNetLog());
|
| + int rv = trans->Start(&CreateGetRequest(), callback.callback(),
|
| + NetLogWithSource());
|
| EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
|
| // Run until we've received the primary HEADERS, the pushed HEADERS,
|
| // the first HEADERS frame, and the body of the primary stream, but before
|
| @@ -4746,8 +4752,8 @@ TEST_F(SpdyNetworkTransactionTest, ServerPushWithNoStatusHeaderFrames) {
|
| // Request the pushed path. At this point, we've received the push, but the
|
| // headers are not yet complete.
|
| HttpNetworkTransaction trans2(DEFAULT_PRIORITY, helper.session());
|
| - rv =
|
| - trans2.Start(&CreateGetPushRequest(), callback.callback(), BoundNetLog());
|
| + rv = trans2.Start(&CreateGetPushRequest(), callback.callback(),
|
| + NetLogWithSource());
|
| EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
|
| data.Resume();
|
| data.RunUntilPaused();
|
| @@ -4807,7 +4813,7 @@ TEST_F(SpdyNetworkTransactionTest, ResponseHeadersTwice) {
|
|
|
| SequencedSocketData data(reads, arraysize(reads), writes, arraysize(writes));
|
| NormalSpdyTransactionHelper helper(CreateGetRequest(), DEFAULT_PRIORITY,
|
| - BoundNetLog(), NULL);
|
| + NetLogWithSource(), NULL);
|
| helper.RunToCompletion(&data);
|
| TransactionHelperResult out = helper.output();
|
| EXPECT_THAT(out.rv, IsError(ERR_SPDY_PROTOCOL_ERROR));
|
| @@ -4842,7 +4848,7 @@ TEST_F(SpdyNetworkTransactionTest, SyncReplyDataAfterTrailers) {
|
|
|
| SequencedSocketData data(reads, arraysize(reads), writes, arraysize(writes));
|
| NormalSpdyTransactionHelper helper(CreateGetRequest(), DEFAULT_PRIORITY,
|
| - BoundNetLog(), NULL);
|
| + NetLogWithSource(), NULL);
|
| helper.RunToCompletion(&data);
|
| TransactionHelperResult out = helper.output();
|
| EXPECT_THAT(out.rv, IsError(ERR_SPDY_PROTOCOL_ERROR));
|
| @@ -4919,8 +4925,8 @@ TEST_F(SpdyNetworkTransactionTest, ServerPushCrossOriginCorrectness) {
|
| proxy_delegate->set_trusted_spdy_proxy(net::ProxyServer::FromURI(
|
| "https://123.45.67.89:443", net::ProxyServer::SCHEME_HTTP));
|
| session_deps->proxy_delegate.reset(proxy_delegate.release());
|
| - NormalSpdyTransactionHelper helper(request, DEFAULT_PRIORITY, BoundNetLog(),
|
| - std::move(session_deps));
|
| + NormalSpdyTransactionHelper helper(
|
| + request, DEFAULT_PRIORITY, NetLogWithSource(), std::move(session_deps));
|
| helper.RunPreTestSetup();
|
| helper.AddData(&data);
|
|
|
| @@ -4929,7 +4935,7 @@ TEST_F(SpdyNetworkTransactionTest, ServerPushCrossOriginCorrectness) {
|
| // Start the transaction with basic parameters.
|
| TestCompletionCallback callback;
|
|
|
| - int rv = trans->Start(&request, callback.callback(), BoundNetLog());
|
| + int rv = trans->Start(&request, callback.callback(), NetLogWithSource());
|
| EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
|
| rv = callback.WaitForResult();
|
|
|
| @@ -4988,7 +4994,7 @@ TEST_F(SpdyNetworkTransactionTest, ServerPushValidCrossOrigin) {
|
| request.url = GURL(url_to_fetch);
|
| request.load_flags = 0;
|
|
|
| - BoundNetLog log;
|
| + NetLogWithSource log;
|
| NormalSpdyTransactionHelper helper(request, DEFAULT_PRIORITY, log, nullptr);
|
| helper.RunPreTestSetup();
|
| helper.AddData(&data);
|
| @@ -5103,7 +5109,7 @@ TEST_F(SpdyNetworkTransactionTest, ServerPushValidCrossOriginWithOpenSession) {
|
| request0.url = GURL(url_to_fetch0);
|
| request0.load_flags = 0;
|
|
|
| - BoundNetLog log;
|
| + NetLogWithSource log;
|
| NormalSpdyTransactionHelper helper(request0, DEFAULT_PRIORITY, log, nullptr);
|
| helper.RunPreTestSetup();
|
|
|
| @@ -5243,8 +5249,8 @@ TEST_F(SpdyNetworkTransactionTest, ServerPushInvalidCrossOrigin) {
|
| request.url = GURL(url_to_fetch);
|
| request.load_flags = 0;
|
|
|
| - NormalSpdyTransactionHelper helper(request, DEFAULT_PRIORITY, BoundNetLog(),
|
| - nullptr);
|
| + NormalSpdyTransactionHelper helper(request, DEFAULT_PRIORITY,
|
| + NetLogWithSource(), nullptr);
|
| helper.RunToCompletion(&data);
|
| TransactionHelperResult out = helper.output();
|
| EXPECT_EQ("HTTP/1.1 200", out.status_line);
|
| @@ -5274,7 +5280,7 @@ TEST_F(SpdyNetworkTransactionTest, RetryAfterRefused) {
|
|
|
| SequencedSocketData data(reads, arraysize(reads), writes, arraysize(writes));
|
| NormalSpdyTransactionHelper helper(CreateGetRequest(), DEFAULT_PRIORITY,
|
| - BoundNetLog(), NULL);
|
| + NetLogWithSource(), NULL);
|
|
|
| helper.RunPreTestSetup();
|
| helper.AddData(&data);
|
| @@ -5283,8 +5289,8 @@ TEST_F(SpdyNetworkTransactionTest, RetryAfterRefused) {
|
|
|
| // Start the transaction with basic parameters.
|
| TestCompletionCallback callback;
|
| - int rv = trans->Start(
|
| - &CreateGetRequest(), callback.callback(), BoundNetLog());
|
| + int rv = trans->Start(&CreateGetRequest(), callback.callback(),
|
| + NetLogWithSource());
|
| EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
|
| rv = callback.WaitForResult();
|
| EXPECT_THAT(rv, IsOk());
|
| @@ -5342,8 +5348,8 @@ TEST_F(SpdyNetworkTransactionTest, OutOfOrderHeaders) {
|
| };
|
|
|
| SequencedSocketData data(reads, arraysize(reads), writes, arraysize(writes));
|
| - NormalSpdyTransactionHelper helper(CreateGetRequest(), LOWEST, BoundNetLog(),
|
| - NULL);
|
| + NormalSpdyTransactionHelper helper(CreateGetRequest(), LOWEST,
|
| + NetLogWithSource(), NULL);
|
| helper.RunPreTestSetup();
|
| helper.AddData(&data);
|
|
|
| @@ -5351,7 +5357,7 @@ TEST_F(SpdyNetworkTransactionTest, OutOfOrderHeaders) {
|
| HttpNetworkTransaction* trans = helper.trans();
|
| TestCompletionCallback callback;
|
| HttpRequestInfo info1 = CreateGetRequest();
|
| - int rv = trans->Start(&info1, callback.callback(), BoundNetLog());
|
| + int rv = trans->Start(&info1, callback.callback(), NetLogWithSource());
|
| EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
|
|
|
| // Run the message loop, but do not allow the write to complete.
|
| @@ -5363,14 +5369,14 @@ TEST_F(SpdyNetworkTransactionTest, OutOfOrderHeaders) {
|
| HttpRequestInfo info2 = CreateGetRequest();
|
| TestCompletionCallback callback2;
|
| HttpNetworkTransaction trans2(MEDIUM, helper.session());
|
| - rv = trans2.Start(&info2, callback2.callback(), BoundNetLog());
|
| + rv = trans2.Start(&info2, callback2.callback(), NetLogWithSource());
|
| EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
|
| base::RunLoop().RunUntilIdle();
|
|
|
| HttpRequestInfo info3 = CreateGetRequest();
|
| TestCompletionCallback callback3;
|
| HttpNetworkTransaction trans3(HIGHEST, helper.session());
|
| - rv = trans3.Start(&info3, callback3.callback(), BoundNetLog());
|
| + rv = trans3.Start(&info3, callback3.callback(), NetLogWithSource());
|
| EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
|
| base::RunLoop().RunUntilIdle();
|
|
|
| @@ -5463,15 +5469,16 @@ TEST_F(SpdyNetworkTransactionTest, WindowUpdateReceived) {
|
| request.url = default_url_;
|
| request.upload_data_stream = &upload_data_stream;
|
|
|
| - NormalSpdyTransactionHelper helper(request, DEFAULT_PRIORITY, BoundNetLog(),
|
| - NULL);
|
| + NormalSpdyTransactionHelper helper(request, DEFAULT_PRIORITY,
|
| + NetLogWithSource(), NULL);
|
| helper.AddData(&data);
|
| helper.RunPreTestSetup();
|
|
|
| HttpNetworkTransaction* trans = helper.trans();
|
|
|
| TestCompletionCallback callback;
|
| - int rv = trans->Start(&helper.request(), callback.callback(), BoundNetLog());
|
| + int rv =
|
| + trans->Start(&helper.request(), callback.callback(), NetLogWithSource());
|
|
|
| EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
|
|
|
| @@ -5579,7 +5586,7 @@ TEST_F(SpdyNetworkTransactionTest, WindowUpdateSent) {
|
| writes.size());
|
|
|
| NormalSpdyTransactionHelper helper(CreateGetRequest(), DEFAULT_PRIORITY,
|
| - BoundNetLog(), NULL);
|
| + NetLogWithSource(), NULL);
|
| helper.AddData(&data);
|
| helper.RunPreTestSetup();
|
|
|
| @@ -5591,7 +5598,8 @@ TEST_F(SpdyNetworkTransactionTest, WindowUpdateSent) {
|
|
|
| HttpNetworkTransaction* trans = helper.trans();
|
| TestCompletionCallback callback;
|
| - int rv = trans->Start(&helper.request(), callback.callback(), BoundNetLog());
|
| + int rv =
|
| + trans->Start(&helper.request(), callback.callback(), NetLogWithSource());
|
|
|
| EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
|
| rv = callback.WaitForResult();
|
| @@ -5670,14 +5678,15 @@ TEST_F(SpdyNetworkTransactionTest, WindowUpdateOverflow) {
|
| request.url = default_url_;
|
| request.upload_data_stream = &upload_data_stream;
|
|
|
| - NormalSpdyTransactionHelper helper(request, DEFAULT_PRIORITY, BoundNetLog(),
|
| - NULL);
|
| + NormalSpdyTransactionHelper helper(request, DEFAULT_PRIORITY,
|
| + NetLogWithSource(), NULL);
|
| helper.RunPreTestSetup();
|
| helper.AddData(&data);
|
| HttpNetworkTransaction* trans = helper.trans();
|
|
|
| TestCompletionCallback callback;
|
| - int rv = trans->Start(&helper.request(), callback.callback(), BoundNetLog());
|
| + int rv =
|
| + trans->Start(&helper.request(), callback.callback(), NetLogWithSource());
|
| ASSERT_THAT(rv, IsError(ERR_IO_PENDING));
|
|
|
| base::RunLoop().RunUntilIdle();
|
| @@ -5807,15 +5816,16 @@ TEST_F(SpdyNetworkTransactionTest, FlowControlStallResume) {
|
| request.method = "POST";
|
| request.url = default_url_;
|
| request.upload_data_stream = &upload_data_stream;
|
| - NormalSpdyTransactionHelper helper(request, DEFAULT_PRIORITY, BoundNetLog(),
|
| - NULL);
|
| + NormalSpdyTransactionHelper helper(request, DEFAULT_PRIORITY,
|
| + NetLogWithSource(), NULL);
|
| helper.AddData(&data);
|
| helper.RunPreTestSetup();
|
|
|
| HttpNetworkTransaction* trans = helper.trans();
|
|
|
| TestCompletionCallback callback;
|
| - int rv = trans->Start(&helper.request(), callback.callback(), BoundNetLog());
|
| + int rv =
|
| + trans->Start(&helper.request(), callback.callback(), NetLogWithSource());
|
| EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
|
|
|
| base::RunLoop().RunUntilIdle(); // Write as much as we can.
|
| @@ -5962,15 +5972,16 @@ TEST_F(SpdyNetworkTransactionTest, FlowControlStallResumeAfterSettings) {
|
| request.method = "POST";
|
| request.url = default_url_;
|
| request.upload_data_stream = &upload_data_stream;
|
| - NormalSpdyTransactionHelper helper(request, DEFAULT_PRIORITY, BoundNetLog(),
|
| - NULL);
|
| + NormalSpdyTransactionHelper helper(request, DEFAULT_PRIORITY,
|
| + NetLogWithSource(), NULL);
|
| helper.RunPreTestSetup();
|
| helper.AddData(&data);
|
|
|
| HttpNetworkTransaction* trans = helper.trans();
|
|
|
| TestCompletionCallback callback;
|
| - int rv = trans->Start(&helper.request(), callback.callback(), BoundNetLog());
|
| + int rv =
|
| + trans->Start(&helper.request(), callback.callback(), NetLogWithSource());
|
| EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
|
|
|
| data.RunUntilPaused(); // Write as much as we can.
|
| @@ -6126,15 +6137,16 @@ TEST_F(SpdyNetworkTransactionTest, FlowControlNegativeSendWindowSize) {
|
| request.method = "POST";
|
| request.url = default_url_;
|
| request.upload_data_stream = &upload_data_stream;
|
| - NormalSpdyTransactionHelper helper(request, DEFAULT_PRIORITY, BoundNetLog(),
|
| - NULL);
|
| + NormalSpdyTransactionHelper helper(request, DEFAULT_PRIORITY,
|
| + NetLogWithSource(), NULL);
|
| helper.RunPreTestSetup();
|
| helper.AddData(&data);
|
|
|
| HttpNetworkTransaction* trans = helper.trans();
|
|
|
| TestCompletionCallback callback;
|
| - int rv = trans->Start(&helper.request(), callback.callback(), BoundNetLog());
|
| + int rv =
|
| + trans->Start(&helper.request(), callback.callback(), NetLogWithSource());
|
| EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
|
|
|
| data.RunUntilPaused(); // Write as much as we can.
|
| @@ -6181,7 +6193,7 @@ TEST_F(SpdyNetworkTransactionTest, GoAwayOnOddPushStreamId) {
|
|
|
| SequencedSocketData data(reads, arraysize(reads), writes, arraysize(writes));
|
| NormalSpdyTransactionHelper helper(CreateGetRequest(), DEFAULT_PRIORITY,
|
| - BoundNetLog(), NULL);
|
| + NetLogWithSource(), NULL);
|
| helper.RunToCompletion(&data);
|
| TransactionHelperResult out = helper.output();
|
| EXPECT_THAT(out.rv, IsError(ERR_SPDY_PROTOCOL_ERROR));
|
| @@ -6211,7 +6223,7 @@ TEST_F(SpdyNetworkTransactionTest,
|
|
|
| SequencedSocketData data(reads, arraysize(reads), writes, arraysize(writes));
|
| NormalSpdyTransactionHelper helper(CreateGetRequest(), DEFAULT_PRIORITY,
|
| - BoundNetLog(), NULL);
|
| + NetLogWithSource(), NULL);
|
| helper.RunToCompletion(&data);
|
| TransactionHelperResult out = helper.output();
|
| EXPECT_THAT(out.rv, IsError(ERR_SPDY_PROTOCOL_ERROR));
|
| @@ -6244,8 +6256,8 @@ TEST_F(SpdyNetworkTransactionTest, LargeRequest) {
|
| };
|
|
|
| SequencedSocketData data(reads, arraysize(reads), writes, arraysize(writes));
|
| - NormalSpdyTransactionHelper helper(request, DEFAULT_PRIORITY, BoundNetLog(),
|
| - nullptr);
|
| + NormalSpdyTransactionHelper helper(request, DEFAULT_PRIORITY,
|
| + NetLogWithSource(), nullptr);
|
| helper.RunToCompletion(&data);
|
| TransactionHelperResult out = helper.output();
|
|
|
| @@ -6281,8 +6293,8 @@ TEST_F(SpdyNetworkTransactionTest, LargeResponseHeader) {
|
| HttpRequestInfo request;
|
| request.method = "GET";
|
| request.url = default_url_;
|
| - NormalSpdyTransactionHelper helper(request, DEFAULT_PRIORITY, BoundNetLog(),
|
| - nullptr);
|
| + NormalSpdyTransactionHelper helper(request, DEFAULT_PRIORITY,
|
| + NetLogWithSource(), nullptr);
|
|
|
| SequencedSocketData data(reads, arraysize(reads), writes, arraysize(writes));
|
| helper.RunToCompletion(&data);
|
| @@ -6310,7 +6322,7 @@ TEST_F(SpdyNetworkTransactionTest, CRLFInHeaderValue) {
|
| SequencedSocketData data(reads, arraysize(reads), writes, arraysize(writes));
|
|
|
| NormalSpdyTransactionHelper helper(CreateGetRequest(), DEFAULT_PRIORITY,
|
| - BoundNetLog(), nullptr);
|
| + NetLogWithSource(), nullptr);
|
| helper.RunToCompletion(&data);
|
| TransactionHelperResult out = helper.output();
|
|
|
| @@ -6330,8 +6342,8 @@ class SpdyNetworkTransactionTLSUsageCheckTest
|
| HttpRequestInfo request;
|
| request.method = "GET";
|
| request.url = default_url_;
|
| - NormalSpdyTransactionHelper helper(request, DEFAULT_PRIORITY, BoundNetLog(),
|
| - NULL);
|
| + NormalSpdyTransactionHelper helper(request, DEFAULT_PRIORITY,
|
| + NetLogWithSource(), NULL);
|
| helper.RunToCompletionWithSSLData(&data, std::move(ssl_provider));
|
| TransactionHelperResult out = helper.output();
|
| EXPECT_THAT(out.rv, IsError(ERR_SPDY_INADEQUATE_TRANSPORT_SECURITY));
|
|
|