| 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 #ifndef NET_WEBSOCKETS_WEBSOCKET_TEST_UTIL_H_ | 5 #ifndef NET_WEBSOCKETS_WEBSOCKET_TEST_UTIL_H_ |
| 6 #define NET_WEBSOCKETS_WEBSOCKET_TEST_UTIL_H_ | 6 #define NET_WEBSOCKETS_WEBSOCKET_TEST_UTIL_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 110 maker_.SetExpectations(expect_written, return_to_read); | 110 maker_.SetExpectations(expect_written, return_to_read); |
| 111 } | 111 } |
| 112 | 112 |
| 113 void AddRawExpectations(scoped_ptr<DeterministicSocketData> socket_data); | 113 void AddRawExpectations(scoped_ptr<DeterministicSocketData> socket_data); |
| 114 | 114 |
| 115 // Allow an SSL socket data provider to be added. | 115 // Allow an SSL socket data provider to be added. |
| 116 void AddSSLSocketDataProvider( | 116 void AddSSLSocketDataProvider( |
| 117 scoped_ptr<SSLSocketDataProvider> ssl_socket_data); | 117 scoped_ptr<SSLSocketDataProvider> ssl_socket_data); |
| 118 | 118 |
| 119 // Call after calling one of SetExpections() or AddRawExpectations(). The | 119 // Call after calling one of SetExpections() or AddRawExpectations(). The |
| 120 // returned pointer remains owned by this object. This should only be called | 120 // returned pointer remains owned by this object. |
| 121 // once. | |
| 122 TestURLRequestContext* GetURLRequestContext(); | 121 TestURLRequestContext* GetURLRequestContext(); |
| 123 | 122 |
| 124 private: | 123 private: |
| 125 WebSocketDeterministicMockClientSocketFactoryMaker maker_; | 124 WebSocketDeterministicMockClientSocketFactoryMaker maker_; |
| 126 TestURLRequestContext url_request_context_; | 125 TestURLRequestContext url_request_context_; |
| 127 TestNetworkDelegate network_delegate_; | 126 TestNetworkDelegate network_delegate_; |
| 127 bool url_request_context_initialized_; |
| 128 | 128 |
| 129 DISALLOW_COPY_AND_ASSIGN(WebSocketTestURLRequestContextHost); | 129 DISALLOW_COPY_AND_ASSIGN(WebSocketTestURLRequestContextHost); |
| 130 }; | 130 }; |
| 131 | 131 |
| 132 } // namespace net | 132 } // namespace net |
| 133 | 133 |
| 134 #endif // NET_WEBSOCKETS_WEBSOCKET_TEST_UTIL_H_ | 134 #endif // NET_WEBSOCKETS_WEBSOCKET_TEST_UTIL_H_ |
| OLD | NEW |