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

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

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 #include "net/http/http_transaction_test_util.h" 5 #include "net/http/http_transaction_test_util.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/message_loop/message_loop.h" 10 #include "base/message_loop/message_loop.h"
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 "HTTP/1.1 200 OK", 54 "HTTP/1.1 200 OK",
55 "", 55 "",
56 base::Time(), 56 base::Time(),
57 "<html><body>Google Blah Blah</body></html>", 57 "<html><body>Google Blah Blah</body></html>",
58 TEST_MODE_NORMAL, 58 TEST_MODE_NORMAL,
59 NULL, 59 NULL,
60 0, 60 0,
61 net::OK 61 net::OK
62 }; 62 };
63 63
64 const MockTransaction kContentLocationPOST_Transaction = {
65 "http://www.example.com/edit",
66 "POST",
67 base::Time(),
68 "",
69 net::LOAD_NORMAL,
70 "HTTP/1.1 200 OK",
71 "Content-Location: http://www.example.com/~foo/bar.html"
72 "",
73 base::Time(),
74 "<html><body>Google Blah Blah</body></html>",
75 TEST_MODE_NORMAL,
76 NULL,
77 0,
78 net::OK
79 };
80
64 const MockTransaction kTypicalGET_Transaction = { 81 const MockTransaction kTypicalGET_Transaction = {
65 "http://www.example.com/~foo/bar.html", 82 "http://www.example.com/~foo/bar.html",
66 "GET", 83 "GET",
67 base::Time(), 84 base::Time(),
68 "", 85 "",
69 net::LOAD_NORMAL, 86 net::LOAD_NORMAL,
70 "HTTP/1.1 200 OK", 87 "HTTP/1.1 200 OK",
71 "Date: Wed, 28 Nov 2007 09:40:09 GMT\n" 88 "Date: Wed, 28 Nov 2007 09:40:09 GMT\n"
72 "Last-Modified: Wed, 28 Nov 2007 00:40:09 GMT\n", 89 "Last-Modified: Wed, 28 Nov 2007 00:40:09 GMT\n",
73 base::Time(), 90 base::Time(),
(...skipping 446 matching lines...) Expand 10 before | Expand all | Expand 10 after
520 537
521 if (rv > 0) 538 if (rv > 0)
522 content.append(buf->data(), rv); 539 content.append(buf->data(), rv);
523 else if (rv < 0) 540 else if (rv < 0)
524 return rv; 541 return rv;
525 } while (rv > 0); 542 } while (rv > 0);
526 543
527 result->swap(content); 544 result->swap(content);
528 return net::OK; 545 return net::OK;
529 } 546 }
OLDNEW
« net/http/http_transaction_test_util.h ('K') | « net/http/http_transaction_test_util.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698