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

Side by Side Diff: net/http/http_transaction_test_util.h

Issue 1092113006: Invalidate urls given in the content-location header in requests using Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 months 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_HTTP_HTTP_TRANSACTION_UNITTEST_H_ 5 #ifndef NET_HTTP_HTTP_TRANSACTION_UNITTEST_H_
6 #define NET_HTTP_HTTP_TRANSACTION_UNITTEST_H_ 6 #define NET_HTTP_HTTP_TRANSACTION_UNITTEST_H_
7 7
8 #include "net/http/http_transaction.h" 8 #include "net/http/http_transaction.h"
9 9
10 #include <string> 10 #include <string>
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 int test_mode; 68 int test_mode;
69 MockTransactionHandler handler; 69 MockTransactionHandler handler;
70 net::CertStatus cert_status; 70 net::CertStatus cert_status;
71 // Value returned by MockNetworkTransaction::Start (potentially 71 // Value returned by MockNetworkTransaction::Start (potentially
72 // asynchronously if |!(test_mode & TEST_MODE_SYNC_NET_START)|.) 72 // asynchronously if |!(test_mode & TEST_MODE_SYNC_NET_START)|.)
73 net::Error return_code; 73 net::Error return_code;
74 }; 74 };
75 75
76 extern const MockTransaction kSimpleGET_Transaction; 76 extern const MockTransaction kSimpleGET_Transaction;
77 extern const MockTransaction kSimplePOST_Transaction; 77 extern const MockTransaction kSimplePOST_Transaction;
78 extern const MockTransaction kContentLocationPOST_Transaction;
Adam Rice 2015/04/24 13:19:21 Since this transaction is only used for one test,
haavardm 2015/04/27 10:48:36 Done.
78 extern const MockTransaction kTypicalGET_Transaction; 79 extern const MockTransaction kTypicalGET_Transaction;
79 extern const MockTransaction kETagGET_Transaction; 80 extern const MockTransaction kETagGET_Transaction;
80 extern const MockTransaction kRangeGET_Transaction; 81 extern const MockTransaction kRangeGET_Transaction;
81 82
82 // returns the mock transaction for the given URL 83 // returns the mock transaction for the given URL
83 const MockTransaction* FindMockTransaction(const GURL& url); 84 const MockTransaction* FindMockTransaction(const GURL& url);
84 85
85 // Add/Remove a mock transaction that can be accessed via FindMockTransaction. 86 // Add/Remove a mock transaction that can be accessed via FindMockTransaction.
86 // There can be only one MockTransaction associated with a given URL. 87 // There can be only one MockTransaction associated with a given URL.
87 void AddMockTransaction(const MockTransaction* trans); 88 void AddMockTransaction(const MockTransaction* trans);
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after
311 base::WeakPtr<MockNetworkTransaction> last_transaction_; 312 base::WeakPtr<MockNetworkTransaction> last_transaction_;
312 }; 313 };
313 314
314 //----------------------------------------------------------------------------- 315 //-----------------------------------------------------------------------------
315 // helpers 316 // helpers
316 317
317 // read the transaction completely 318 // read the transaction completely
318 int ReadTransaction(net::HttpTransaction* trans, std::string* result); 319 int ReadTransaction(net::HttpTransaction* trans, std::string* result);
319 320
320 #endif // NET_HTTP_HTTP_TRANSACTION_UNITTEST_H_ 321 #endif // NET_HTTP_HTTP_TRANSACTION_UNITTEST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698