| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/websockets/websocket_job.h" | 5 #include "net/websockets/websocket_job.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| 11 #include "base/bind_helpers.h" | 11 #include "base/bind_helpers.h" |
| 12 #include "base/callback.h" | 12 #include "base/callback.h" |
| 13 #include "base/memory/ref_counted.h" | 13 #include "base/memory/ref_counted.h" |
| 14 #include "base/strings/string_split.h" | 14 #include "base/strings/string_split.h" |
| 15 #include "base/strings/string_util.h" | 15 #include "base/strings/string_util.h" |
| 16 #include "googleurl/src/gurl.h" | |
| 17 #include "net/base/completion_callback.h" | 16 #include "net/base/completion_callback.h" |
| 18 #include "net/base/net_errors.h" | 17 #include "net/base/net_errors.h" |
| 19 #include "net/base/test_completion_callback.h" | 18 #include "net/base/test_completion_callback.h" |
| 20 #include "net/cookies/cookie_store.h" | 19 #include "net/cookies/cookie_store.h" |
| 21 #include "net/cookies/cookie_store_test_helpers.h" | 20 #include "net/cookies/cookie_store_test_helpers.h" |
| 22 #include "net/dns/mock_host_resolver.h" | 21 #include "net/dns/mock_host_resolver.h" |
| 23 #include "net/http/http_transaction_factory.h" | 22 #include "net/http/http_transaction_factory.h" |
| 24 #include "net/http/transport_security_state.h" | 23 #include "net/http/transport_security_state.h" |
| 25 #include "net/proxy/proxy_service.h" | 24 #include "net/proxy/proxy_service.h" |
| 26 #include "net/socket/next_proto.h" | 25 #include "net/socket/next_proto.h" |
| 27 #include "net/socket/socket_test_util.h" | 26 #include "net/socket/socket_test_util.h" |
| 28 #include "net/socket_stream/socket_stream.h" | 27 #include "net/socket_stream/socket_stream.h" |
| 29 #include "net/spdy/spdy_session.h" | 28 #include "net/spdy/spdy_session.h" |
| 30 #include "net/spdy/spdy_websocket_test_util.h" | 29 #include "net/spdy/spdy_websocket_test_util.h" |
| 31 #include "net/ssl/ssl_config_service.h" | 30 #include "net/ssl/ssl_config_service.h" |
| 32 #include "net/url_request/url_request_context.h" | 31 #include "net/url_request/url_request_context.h" |
| 33 #include "net/websockets/websocket_throttle.h" | 32 #include "net/websockets/websocket_throttle.h" |
| 34 #include "testing/gmock/include/gmock/gmock.h" | 33 #include "testing/gmock/include/gmock/gmock.h" |
| 35 #include "testing/gtest/include/gtest/gtest.h" | 34 #include "testing/gtest/include/gtest/gtest.h" |
| 36 #include "testing/platform_test.h" | 35 #include "testing/platform_test.h" |
| 36 #include "url/gurl.h" |
| 37 | 37 |
| 38 namespace net { | 38 namespace net { |
| 39 | 39 |
| 40 namespace { | 40 namespace { |
| 41 | 41 |
| 42 class MockSocketStream : public SocketStream { | 42 class MockSocketStream : public SocketStream { |
| 43 public: | 43 public: |
| 44 MockSocketStream(const GURL& url, SocketStream::Delegate* delegate) | 44 MockSocketStream(const GURL& url, SocketStream::Delegate* delegate) |
| 45 : SocketStream(url, delegate) {} | 45 : SocketStream(url, delegate) {} |
| 46 | 46 |
| (...skipping 1023 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1070 } | 1070 } |
| 1071 | 1071 |
| 1072 TEST_P(WebSocketJobTest, ThrottlingSpdySpdyEnabled) { | 1072 TEST_P(WebSocketJobTest, ThrottlingSpdySpdyEnabled) { |
| 1073 WebSocketJob::set_websocket_over_spdy_enabled(true); | 1073 WebSocketJob::set_websocket_over_spdy_enabled(true); |
| 1074 TestConnectBySpdy(SPDY_ON, THROTTLING_ON); | 1074 TestConnectBySpdy(SPDY_ON, THROTTLING_ON); |
| 1075 } | 1075 } |
| 1076 | 1076 |
| 1077 // TODO(toyoshim): Add tests to verify throttling, SPDY stream limitation. | 1077 // TODO(toyoshim): Add tests to verify throttling, SPDY stream limitation. |
| 1078 // TODO(toyoshim,yutak): Add tests to verify closing handshake. | 1078 // TODO(toyoshim,yutak): Add tests to verify closing handshake. |
| 1079 } // namespace net | 1079 } // namespace net |
| OLD | NEW |