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 <stddef.h> | 5 #include <stddef.h> |
6 #include <stdint.h> | 6 #include <stdint.h> |
7 | 7 |
8 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
11 #include "base/macros.h" | 11 #include "base/macros.h" |
12 #include "base/memory/linked_ptr.h" | 12 #include "base/memory/linked_ptr.h" |
13 #include "base/memory/ref_counted.h" | 13 #include "base/memory/ref_counted.h" |
14 #include "base/memory/scoped_ptr.h" | 14 #include "base/memory/scoped_ptr.h" |
15 #include "base/run_loop.h" | 15 #include "base/run_loop.h" |
16 #include "base/strings/string_util.h" | 16 #include "base/strings/string_util.h" |
17 #include "base/strings/stringprintf.h" | 17 #include "base/strings/stringprintf.h" |
18 #include "mojo/application/public/cpp/application_connection.h" | |
19 #include "mojo/application/public/cpp/application_impl.h" | |
20 #include "mojo/application/public/cpp/application_test_base.h" | |
21 #include "mojo/common/data_pipe_utils.h" | 18 #include "mojo/common/data_pipe_utils.h" |
22 #include "mojo/services/network/net_address_type_converters.h" | 19 #include "mojo/services/network/net_address_type_converters.h" |
23 #include "mojo/services/network/public/cpp/web_socket_read_queue.h" | 20 #include "mojo/services/network/public/cpp/web_socket_read_queue.h" |
24 #include "mojo/services/network/public/cpp/web_socket_write_queue.h" | 21 #include "mojo/services/network/public/cpp/web_socket_write_queue.h" |
25 #include "mojo/services/network/public/interfaces/http_connection.mojom.h" | 22 #include "mojo/services/network/public/interfaces/http_connection.mojom.h" |
26 #include "mojo/services/network/public/interfaces/http_message.mojom.h" | 23 #include "mojo/services/network/public/interfaces/http_message.mojom.h" |
27 #include "mojo/services/network/public/interfaces/http_server.mojom.h" | 24 #include "mojo/services/network/public/interfaces/http_server.mojom.h" |
28 #include "mojo/services/network/public/interfaces/net_address.mojom.h" | 25 #include "mojo/services/network/public/interfaces/net_address.mojom.h" |
29 #include "mojo/services/network/public/interfaces/network_service.mojom.h" | 26 #include "mojo/services/network/public/interfaces/network_service.mojom.h" |
30 #include "mojo/services/network/public/interfaces/web_socket.mojom.h" | 27 #include "mojo/services/network/public/interfaces/web_socket.mojom.h" |
31 #include "mojo/services/network/public/interfaces/web_socket_factory.mojom.h" | 28 #include "mojo/services/network/public/interfaces/web_socket_factory.mojom.h" |
| 29 #include "mojo/shell/public/cpp/application_connection.h" |
| 30 #include "mojo/shell/public/cpp/application_impl.h" |
| 31 #include "mojo/shell/public/cpp/application_test_base.h" |
32 #include "net/base/io_buffer.h" | 32 #include "net/base/io_buffer.h" |
33 #include "net/base/net_errors.h" | 33 #include "net/base/net_errors.h" |
34 #include "net/base/test_completion_callback.h" | 34 #include "net/base/test_completion_callback.h" |
35 #include "net/http/http_response_headers.h" | 35 #include "net/http/http_response_headers.h" |
36 #include "net/http/http_util.h" | 36 #include "net/http/http_util.h" |
37 #include "net/socket/tcp_client_socket.h" | 37 #include "net/socket/tcp_client_socket.h" |
38 #include "testing/gtest/include/gtest/gtest.h" | 38 #include "testing/gtest/include/gtest/gtest.h" |
39 | 39 |
40 namespace mojo { | 40 namespace mojo { |
41 namespace { | 41 namespace { |
(...skipping 649 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
691 | 691 |
692 socket_1.Send("How do"); | 692 socket_1.Send("How do"); |
693 socket_1.Send("you do?"); | 693 socket_1.Send("you do?"); |
694 | 694 |
695 socket_0.WaitForMessage(2); | 695 socket_0.WaitForMessage(2); |
696 EXPECT_EQ("How do", socket_0.received_messages()[0]); | 696 EXPECT_EQ("How do", socket_0.received_messages()[0]); |
697 EXPECT_EQ("you do?", socket_0.received_messages()[1]); | 697 EXPECT_EQ("you do?", socket_0.received_messages()[1]); |
698 } | 698 } |
699 | 699 |
700 } // namespace mojo | 700 } // namespace mojo |
OLD | NEW |