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

Side by Side Diff: net/test/embedded_test_server/http_response_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_response.h" 5 #include "net/test/embedded_test_server/http_response.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(HttpResponseTest, GenerateResponse) { 12 TEST(HttpResponseTest, GenerateResponse) {
13 HttpResponse response; 13 HttpResponse response;
14 response.set_code(SUCCESS); 14 response.set_code(SUCCESS);
15 response.set_content("Sample content - Hello world!"); 15 response.set_content("Sample content - Hello world!");
16 response.set_content_type("text/plain"); 16 response.set_content_type("text/plain");
17 response.AddCustomHeader("Simple-Header", "Simple value."); 17 response.AddCustomHeader("Simple-Header", "Simple value.");
18 18
19 std::string kExpectedResponseString = 19 std::string kExpectedResponseString =
20 "HTTP/1.1 200 OK\r\n" 20 "HTTP/1.1 200 OK\r\n"
21 "Connection: closed\r\n" 21 "Connection: closed\r\n"
22 "Content-Length: 29\r\n" 22 "Content-Length: 29\r\n"
23 "Content-Type: text/plain\r\n" 23 "Content-Type: text/plain\r\n"
24 "Simple-Header: Simple value.\r\n\r\n" 24 "Simple-Header: Simple value.\r\n\r\n"
25 "Sample content - Hello world!"; 25 "Sample content - Hello world!";
26 26
27 EXPECT_EQ(kExpectedResponseString, response.ToResponseString()); 27 EXPECT_EQ(kExpectedResponseString, response.ToResponseString());
28 } 28 }
29 29
30 } // namespace test_server 30 } // namespace test_server
31 } // namespace google_apis 31 } // namespace net
OLDNEW
« no previous file with comments | « net/test/embedded_test_server/http_response.cc ('k') | net/test/embedded_test_server/http_server.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698