| 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 3762 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3773 pos = net::ExpectLogContainsSomewhere(entries, pos + 1, | 3773 pos = net::ExpectLogContainsSomewhere(entries, pos + 1, |
| 3774 net::NetLog::TYPE_HTTP_TRANSACTION_READ_BODY, | 3774 net::NetLog::TYPE_HTTP_TRANSACTION_READ_BODY, |
| 3775 net::NetLog::PHASE_END); | 3775 net::NetLog::PHASE_END); |
| 3776 | 3776 |
| 3777 // Check that we logged all the headers correctly | 3777 // Check that we logged all the headers correctly |
| 3778 pos = net::ExpectLogContainsSomewhere( | 3778 pos = net::ExpectLogContainsSomewhere( |
| 3779 entries, 0, | 3779 entries, 0, |
| 3780 net::NetLog::TYPE_SPDY_SESSION_SYN_STREAM, | 3780 net::NetLog::TYPE_SPDY_SESSION_SYN_STREAM, |
| 3781 net::NetLog::PHASE_NONE); | 3781 net::NetLog::PHASE_NONE); |
| 3782 | 3782 |
| 3783 ListValue* header_list; | 3783 base::ListValue* header_list; |
| 3784 ASSERT_TRUE(entries[pos].params.get()); | 3784 ASSERT_TRUE(entries[pos].params.get()); |
| 3785 ASSERT_TRUE(entries[pos].params->GetList("headers", &header_list)); | 3785 ASSERT_TRUE(entries[pos].params->GetList("headers", &header_list)); |
| 3786 | 3786 |
| 3787 std::vector<std::string> expected; | 3787 std::vector<std::string> expected; |
| 3788 expected.push_back("host: www.google.com"); | 3788 expected.push_back("host: www.google.com"); |
| 3789 expected.push_back("url: /"); | 3789 expected.push_back("url: /"); |
| 3790 expected.push_back("scheme: http"); | 3790 expected.push_back("scheme: http"); |
| 3791 expected.push_back("version: HTTP/1.1"); | 3791 expected.push_back("version: HTTP/1.1"); |
| 3792 expected.push_back("method: GET"); | 3792 expected.push_back("method: GET"); |
| 3793 expected.push_back("user-agent: Chrome"); | 3793 expected.push_back("user-agent: Chrome"); |
| (...skipping 2147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5941 // And now we can allow everything else to run to completion. | 5941 // And now we can allow everything else to run to completion. |
| 5942 data.SetStop(10); | 5942 data.SetStop(10); |
| 5943 data.Run(); | 5943 data.Run(); |
| 5944 EXPECT_EQ(OK, callback2.WaitForResult()); | 5944 EXPECT_EQ(OK, callback2.WaitForResult()); |
| 5945 EXPECT_EQ(OK, callback3.WaitForResult()); | 5945 EXPECT_EQ(OK, callback3.WaitForResult()); |
| 5946 | 5946 |
| 5947 helper.VerifyDataConsumed(); | 5947 helper.VerifyDataConsumed(); |
| 5948 } | 5948 } |
| 5949 | 5949 |
| 5950 } // namespace net | 5950 } // namespace net |
| OLD | NEW |