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

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

Issue 7995: Move Time, TimeDelta and TimeTicks into namespace base. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 12 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 <algorithm> 5 #include <algorithm>
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/pickle.h" 8 #include "base/pickle.h"
9 #include "base/time.h" 9 #include "base/time.h"
10 #include "net/http/http_response_headers.h" 10 #include "net/http/http_response_headers.h"
11 #include "testing/gtest/include/gtest/gtest.h" 11 #include "testing/gtest/include/gtest/gtest.h"
12 12
13 using namespace std; 13 using namespace std;
14 using base::Time;
14 using net::HttpResponseHeaders; 15 using net::HttpResponseHeaders;
15 using net::HttpVersion; 16 using net::HttpVersion;
16 17
17 namespace { 18 namespace {
18 19
19 struct TestData { 20 struct TestData {
20 const char* raw_headers; 21 const char* raw_headers;
21 const char* expected_headers; 22 const char* expected_headers;
22 int expected_response_code; 23 int expected_response_code;
23 HttpVersion expected_parsed_version; 24 HttpVersion expected_parsed_version;
(...skipping 1060 matching lines...) Expand 10 before | Expand all | Expand 10 after
1084 } 1085 }
1085 1086
1086 TEST(HttpResponseHeadersTest, GetStatusBadStatusLine) { 1087 TEST(HttpResponseHeadersTest, GetStatusBadStatusLine) {
1087 std::string headers("Foo bar."); 1088 std::string headers("Foo bar.");
1088 HeadersToRaw(&headers); 1089 HeadersToRaw(&headers);
1089 scoped_refptr<HttpResponseHeaders> parsed = new HttpResponseHeaders(headers); 1090 scoped_refptr<HttpResponseHeaders> parsed = new HttpResponseHeaders(headers);
1090 // The bad status line would have gotten rewritten as 1091 // The bad status line would have gotten rewritten as
1091 // HTTP/1.0 200 OK. 1092 // HTTP/1.0 200 OK.
1092 EXPECT_EQ(std::string("OK"), parsed->GetStatusText()); 1093 EXPECT_EQ(std::string("OK"), parsed->GetStatusText());
1093 } 1094 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698