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 <string> | 5 #include <string> |
6 | 6 |
7 #include "base/memory/ref_counted.h" | 7 #include "base/memory/ref_counted.h" |
8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
9 #include "base/memory/scoped_vector.h" | 9 #include "base/memory/scoped_vector.h" |
10 #include "base/stringprintf.h" | 10 #include "base/stringprintf.h" |
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
105 data_vector_.push_back(data); | 105 data_vector_.push_back(data); |
106 } | 106 } |
107 | 107 |
108 enum RequestInfoOptions { | 108 enum RequestInfoOptions { |
109 REQUEST_DEFAULT, | 109 REQUEST_DEFAULT, |
110 REQUEST_MAIN_RESOURCE, | 110 REQUEST_MAIN_RESOURCE, |
111 }; | 111 }; |
112 | 112 |
113 HttpRequestInfo* GetRequestInfo( | 113 HttpRequestInfo* GetRequestInfo( |
114 const char* filename, RequestInfoOptions options = REQUEST_DEFAULT) { | 114 const char* filename, RequestInfoOptions options = REQUEST_DEFAULT) { |
115 std::string url = StringPrintf("http://localhost/%s", filename); | 115 std::string url = base::StringPrintf("http://localhost/%s", filename); |
116 HttpRequestInfo* request_info = new HttpRequestInfo; | 116 HttpRequestInfo* request_info = new HttpRequestInfo; |
117 request_info->url = GURL(url); | 117 request_info->url = GURL(url); |
118 request_info->method = "GET"; | 118 request_info->method = "GET"; |
119 if (options == REQUEST_MAIN_RESOURCE) { | 119 if (options == REQUEST_MAIN_RESOURCE) { |
120 request_info->load_flags = LOAD_MAIN_FRAME; | 120 request_info->load_flags = LOAD_MAIN_FRAME; |
121 } | 121 } |
122 request_info_vector_.push_back(request_info); | 122 request_info_vector_.push_back(request_info); |
123 return request_info; | 123 return request_info; |
124 } | 124 } |
125 | 125 |
(...skipping 896 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1022 EXPECT_EQ(ERR_PIPELINE_EVICTION, two_callback.WaitForResult()); | 1022 EXPECT_EQ(ERR_PIPELINE_EVICTION, two_callback.WaitForResult()); |
1023 two_transaction.reset(); | 1023 two_transaction.reset(); |
1024 EXPECT_EQ(ERR_PIPELINE_EVICTION, three_callback.WaitForResult()); | 1024 EXPECT_EQ(ERR_PIPELINE_EVICTION, three_callback.WaitForResult()); |
1025 three_transaction.reset(); | 1025 three_transaction.reset(); |
1026 EXPECT_EQ(ERR_PIPELINE_EVICTION, four_callback.WaitForResult()); | 1026 EXPECT_EQ(ERR_PIPELINE_EVICTION, four_callback.WaitForResult()); |
1027 } | 1027 } |
1028 | 1028 |
1029 } // anonymous namespace | 1029 } // anonymous namespace |
1030 | 1030 |
1031 } // namespace net | 1031 } // namespace net |
OLD | NEW |