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

Side by Side Diff: net/test/embedded_test_server/http_request_unittest.cc

Issue 15069003: Rename the embedded test server to EmbeddedTestServer in net::test_server namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: nit Created 7 years, 7 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 | Annotate | Revision Log
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 #include "net/test/embedded_test_server/http_request.h" 5 #include "net/test/embedded_test_server/http_request.h"
6 6
7 #include "testing/gtest/include/gtest/gtest.h" 7 #include "testing/gtest/include/gtest/gtest.h"
8 8
9 namespace google_apis { 9 namespace net {
10 namespace test_server { 10 namespace test_server {
11 11
12 TEST(HttpRequestTest, ParseRequest) { 12 TEST(HttpRequestTest, ParseRequest) {
13 HttpRequestParser parser; 13 HttpRequestParser parser;
14 14
15 // Process request in chunks to check if the parser deals with border cases. 15 // Process request in chunks to check if the parser deals with border cases.
16 // Also, check multi-line headers as well as multiple requests in the same 16 // Also, check multi-line headers as well as multiple requests in the same
17 // chunk. This basically should cover all the simplest border cases. 17 // chunk. This basically should cover all the simplest border cases.
18 parser.ProcessChunk("POST /foobar.html HTTP/1.1\r\n"); 18 parser.ProcessChunk("POST /foobar.html HTTP/1.1\r\n");
19 EXPECT_EQ(HttpRequestParser::WAITING, parser.ParseRequest()); 19 EXPECT_EQ(HttpRequestParser::WAITING, parser.ParseRequest());
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 72
73 parser.ProcessChunk("POST /foobar.html HTTP/1.1\r\n\r\n"); 73 parser.ProcessChunk("POST /foobar.html HTTP/1.1\r\n\r\n");
74 ASSERT_EQ(HttpRequestParser::ACCEPTED, parser.ParseRequest()); 74 ASSERT_EQ(HttpRequestParser::ACCEPTED, parser.ParseRequest());
75 75
76 scoped_ptr<HttpRequest> request = parser.GetRequest(); 76 scoped_ptr<HttpRequest> request = parser.GetRequest();
77 EXPECT_EQ("", request->content); 77 EXPECT_EQ("", request->content);
78 EXPECT_FALSE(request->has_content); 78 EXPECT_FALSE(request->has_content);
79 } 79 }
80 80
81 } // namespace test_server 81 } // namespace test_server
82 } // namespace google_apis 82 } // namespace net
OLDNEW
« no previous file with comments | « net/test/embedded_test_server/http_request.cc ('k') | net/test/embedded_test_server/http_response.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698