OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "net/http/http_network_transaction.h" | 5 #include "net/http/http_network_transaction.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 4352 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4363 pos = net::ExpectLogContainsSomewhere(entries, pos + 1, | 4363 pos = net::ExpectLogContainsSomewhere(entries, pos + 1, |
4364 net::NetLog::TYPE_HTTP_TRANSACTION_READ_BODY, | 4364 net::NetLog::TYPE_HTTP_TRANSACTION_READ_BODY, |
4365 net::NetLog::PHASE_END); | 4365 net::NetLog::PHASE_END); |
4366 | 4366 |
4367 // Check that we logged all the headers correctly | 4367 // Check that we logged all the headers correctly |
4368 pos = net::ExpectLogContainsSomewhere( | 4368 pos = net::ExpectLogContainsSomewhere( |
4369 entries, 0, | 4369 entries, 0, |
4370 net::NetLog::TYPE_SPDY_SESSION_SYN_STREAM, | 4370 net::NetLog::TYPE_SPDY_SESSION_SYN_STREAM, |
4371 net::NetLog::PHASE_NONE); | 4371 net::NetLog::PHASE_NONE); |
4372 | 4372 |
4373 ListValue* header_list; | 4373 base::ListValue* header_list; |
4374 ASSERT_TRUE(entries[pos].params.get()); | 4374 ASSERT_TRUE(entries[pos].params.get()); |
4375 ASSERT_TRUE(entries[pos].params->GetList("headers", &header_list)); | 4375 ASSERT_TRUE(entries[pos].params->GetList("headers", &header_list)); |
4376 | 4376 |
4377 std::vector<std::string> expected; | 4377 std::vector<std::string> expected; |
4378 expected.push_back(":host: www.google.com"); | 4378 expected.push_back(":host: www.google.com"); |
4379 expected.push_back(":path: /"); | 4379 expected.push_back(":path: /"); |
4380 expected.push_back(":scheme: http"); | 4380 expected.push_back(":scheme: http"); |
4381 expected.push_back(":version: HTTP/1.1"); | 4381 expected.push_back(":version: HTTP/1.1"); |
4382 expected.push_back(":method: GET"); | 4382 expected.push_back(":method: GET"); |
4383 expected.push_back("user-agent: Chrome"); | 4383 expected.push_back("user-agent: Chrome"); |
(...skipping 2156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6540 // And now we can allow everything else to run to completion. | 6540 // And now we can allow everything else to run to completion. |
6541 data.SetStop(10); | 6541 data.SetStop(10); |
6542 data.Run(); | 6542 data.Run(); |
6543 EXPECT_EQ(OK, callback2.WaitForResult()); | 6543 EXPECT_EQ(OK, callback2.WaitForResult()); |
6544 EXPECT_EQ(OK, callback3.WaitForResult()); | 6544 EXPECT_EQ(OK, callback3.WaitForResult()); |
6545 | 6545 |
6546 helper.VerifyDataConsumed(); | 6546 helper.VerifyDataConsumed(); |
6547 } | 6547 } |
6548 | 6548 |
6549 } // namespace net | 6549 } // namespace net |
OLD | NEW |