Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(34)

Side by Side Diff: net/url_request/url_request_test_job.h

Issue 1414983002: Make URLRequestTestJob accept \n terminated header lines. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Comments mmenke Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 #ifndef NET_URL_REQUEST_URL_REQUEST_TEST_JOB_H_ 5 #ifndef NET_URL_REQUEST_URL_REQUEST_TEST_JOB_H_
6 #define NET_URL_REQUEST_URL_REQUEST_TEST_JOB_H_ 6 #define NET_URL_REQUEST_URL_REQUEST_TEST_JOB_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/memory/weak_ptr.h" 10 #include "base/memory/weak_ptr.h"
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 // request url, with auto advance disabled. 43 // request url, with auto advance disabled.
44 URLRequestTestJob(URLRequest* request, NetworkDelegate* network_delegate); 44 URLRequestTestJob(URLRequest* request, NetworkDelegate* network_delegate);
45 45
46 // Constructs a job to return one of the canned responses depending on the 46 // Constructs a job to return one of the canned responses depending on the
47 // request url, optionally with auto advance enabled. 47 // request url, optionally with auto advance enabled.
48 URLRequestTestJob(URLRequest* request, 48 URLRequestTestJob(URLRequest* request,
49 NetworkDelegate* network_delegate, 49 NetworkDelegate* network_delegate,
50 bool auto_advance); 50 bool auto_advance);
51 51
52 // Constructs a job to return the given response regardless of the request 52 // Constructs a job to return the given response regardless of the request
53 // url. The headers should include the HTTP status line and be formatted as 53 // url. The headers should include the HTTP status line and use CRLF/LF as the
54 // expected by HttpResponseHeaders. 54 // line separator.
55 URLRequestTestJob(URLRequest* request, 55 URLRequestTestJob(URLRequest* request,
56 NetworkDelegate* network_delegate, 56 NetworkDelegate* network_delegate,
57 const std::string& response_headers, 57 const std::string& response_headers,
58 const std::string& response_data, 58 const std::string& response_data,
59 bool auto_advance); 59 bool auto_advance);
60 60
61 // The canned URLs this handler will respond to without having been 61 // The canned URLs this handler will respond to without having been
62 // explicitly initialized with response headers and data. 62 // explicitly initialized with response headers and data.
63 // FIXME(brettw): we should probably also have a redirect one 63 // FIXME(brettw): we should probably also have a redirect one
64 static GURL test_url_1(); 64 static GURL test_url_1();
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 int async_buf_size_; 164 int async_buf_size_;
165 165
166 LoadTimingInfo load_timing_info_; 166 LoadTimingInfo load_timing_info_;
167 167
168 base::WeakPtrFactory<URLRequestTestJob> weak_factory_; 168 base::WeakPtrFactory<URLRequestTestJob> weak_factory_;
169 }; 169 };
170 170
171 } // namespace net 171 } // namespace net
172 172
173 #endif // NET_URL_REQUEST_URL_REQUEST_TEST_JOB_H_ 173 #endif // NET_URL_REQUEST_URL_REQUEST_TEST_JOB_H_
OLDNEW
« no previous file with comments | « content/browser/service_worker/service_worker_write_to_cache_job_unittest.cc ('k') | net/url_request/url_request_test_job.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698