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

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

Issue 2542843006: ResourceLoader: Fix a bunch of double-cancellation/double-error notification cases. (Closed)
Patch Set: Fix merge Created 4 years 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
« no previous file with comments | « net/url_request/url_request_job.cc ('k') | net/url_request/url_request_test_job.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 ~URLRequestTestJob() override; 62 ~URLRequestTestJob() override;
63 63
64 // The canned URLs this handler will respond to without having been 64 // The canned URLs this handler will respond to without having been
65 // explicitly initialized with response headers and data. 65 // explicitly initialized with response headers and data.
66 // FIXME(brettw): we should probably also have a redirect one 66 // FIXME(brettw): we should probably also have a redirect one
67 static GURL test_url_1(); 67 static GURL test_url_1();
68 static GURL test_url_2(); 68 static GURL test_url_2();
69 static GURL test_url_3(); 69 static GURL test_url_3();
70 static GURL test_url_4(); 70 static GURL test_url_4();
71 static GURL test_url_error(); 71 static GURL test_url_error();
72 static GURL test_url_redirect_to_url_1();
72 static GURL test_url_redirect_to_url_2(); 73 static GURL test_url_redirect_to_url_2();
73 74
74 // The data that corresponds to each of the URLs above 75 // The data that corresponds to each of the URLs above
75 static std::string test_data_1(); 76 static std::string test_data_1();
76 static std::string test_data_2(); 77 static std::string test_data_2();
77 static std::string test_data_3(); 78 static std::string test_data_3();
78 static std::string test_data_4(); 79 static std::string test_data_4();
79 80
80 // The headers that correspond to each of the URLs above 81 // The headers that correspond to each of the URLs above
81 static std::string test_headers(); 82 static std::string test_headers();
82 83
83 // The headers for a redirect response 84 // The headers for a redirect response
84 static std::string test_redirect_headers(); 85 static std::string test_redirect_headers();
85 86
87 // The headers for a redirect response to the first test url.
88 static std::string test_redirect_to_url_1_headers();
89
86 // The headers for a redirect response to the second test url. 90 // The headers for a redirect response to the second test url.
87 static std::string test_redirect_to_url_2_headers(); 91 static std::string test_redirect_to_url_2_headers();
88 92
89 // The headers for a server error response 93 // The headers for a server error response
90 static std::string test_error_headers(); 94 static std::string test_error_headers();
91 95
92 // Processes one pending message from the stack, returning true if any 96 // Processes one pending message from the stack, returning true if any
93 // message was processed, or false if there are no more pending request 97 // message was processed, or false if there are no more pending request
94 // notifications to send. This is not applicable when using auto_advance. 98 // notifications to send. This is not applicable when using auto_advance.
95 static bool ProcessOnePendingMessage(); 99 static bool ProcessOnePendingMessage();
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
173 177
174 // Original size in bytes of the response headers before decoding. 178 // Original size in bytes of the response headers before decoding.
175 int response_headers_length_; 179 int response_headers_length_;
176 180
177 base::WeakPtrFactory<URLRequestTestJob> weak_factory_; 181 base::WeakPtrFactory<URLRequestTestJob> weak_factory_;
178 }; 182 };
179 183
180 } // namespace net 184 } // namespace net
181 185
182 #endif // NET_URL_REQUEST_URL_REQUEST_TEST_JOB_H_ 186 #endif // NET_URL_REQUEST_URL_REQUEST_TEST_JOB_H_
OLDNEW
« no previous file with comments | « net/url_request/url_request_job.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