| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "base/macros.h" | 5 #include "base/macros.h" |
| 6 #include "base/memory/linked_ptr.h" | 6 #include "base/memory/linked_ptr.h" |
| 7 #include "base/memory/ref_counted.h" | 7 #include "base/memory/ref_counted.h" |
| 8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
| 9 #include "base/run_loop.h" | 9 #include "base/run_loop.h" |
| 10 #include "base/strings/string_util.h" | 10 #include "base/strings/string_util.h" |
| 11 #include "mojo/application/application_test_base_chromium.h" | |
| 12 #include "mojo/application/public/cpp/application_connection.h" | 11 #include "mojo/application/public/cpp/application_connection.h" |
| 13 #include "mojo/application/public/cpp/application_impl.h" | 12 #include "mojo/application/public/cpp/application_impl.h" |
| 13 #include "mojo/application/public/cpp/application_test_base.h" |
| 14 #include "mojo/common/data_pipe_utils.h" | 14 #include "mojo/common/data_pipe_utils.h" |
| 15 #include "mojo/services/network/net_address_type_converters.h" | 15 #include "mojo/services/network/net_address_type_converters.h" |
| 16 #include "mojo/services/network/public/interfaces/http_server.mojom.h" | 16 #include "mojo/services/network/public/interfaces/http_server.mojom.h" |
| 17 #include "mojo/services/network/public/interfaces/network_service.mojom.h" | 17 #include "mojo/services/network/public/interfaces/network_service.mojom.h" |
| 18 #include "net/base/io_buffer.h" | 18 #include "net/base/io_buffer.h" |
| 19 #include "net/base/net_errors.h" | 19 #include "net/base/net_errors.h" |
| 20 #include "net/base/test_completion_callback.h" | 20 #include "net/base/test_completion_callback.h" |
| 21 #include "net/http/http_response_headers.h" | 21 #include "net/http/http_response_headers.h" |
| 22 #include "net/http/http_util.h" | 22 #include "net/http/http_util.h" |
| 23 #include "net/socket/tcp_client_socket.h" | 23 #include "net/socket/tcp_client_socket.h" |
| (...skipping 448 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 472 make_scoped_ptr(new std::string("This is a test response..."))}; | 472 make_scoped_ptr(new std::string("This is a test response..."))}; |
| 473 connection.SendResponse(MakeResponseStruct(response_data)); | 473 connection.SendResponse(MakeResponseStruct(response_data)); |
| 474 | 474 |
| 475 std::string response_message; | 475 std::string response_message; |
| 476 client.ReadResponse(&response_message); | 476 client.ReadResponse(&response_message); |
| 477 | 477 |
| 478 CheckResponse(response_data, response_message); | 478 CheckResponse(response_data, response_message); |
| 479 } | 479 } |
| 480 | 480 |
| 481 } // namespace mojo | 481 } // namespace mojo |
| OLD | NEW |