OLD | NEW |
---|---|
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 #ifndef NET_SPDY_SPDY_TEST_UTIL_H_ | 5 #ifndef NET_SPDY_SPDY_TEST_UTIL_H_ |
6 #define NET_SPDY_SPDY_TEST_UTIL_H_ | 6 #define NET_SPDY_SPDY_TEST_UTIL_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/memory/scoped_ptr.h" | |
9 #include "net/base/cert_verifier.h" | 10 #include "net/base/cert_verifier.h" |
10 #include "net/base/host_port_pair.h" | 11 #include "net/base/host_port_pair.h" |
11 #include "net/base/mock_host_resolver.h" | 12 #include "net/base/mock_host_resolver.h" |
12 #include "net/base/request_priority.h" | 13 #include "net/base/request_priority.h" |
13 #include "net/base/ssl_config_service_defaults.h" | 14 #include "net/base/ssl_config_service_defaults.h" |
14 #include "net/http/http_auth_handler_factory.h" | 15 #include "net/http/http_auth_handler_factory.h" |
15 #include "net/http/http_cache.h" | 16 #include "net/http/http_cache.h" |
16 #include "net/http/http_network_session.h" | 17 #include "net/http/http_network_session.h" |
17 #include "net/http/http_network_layer.h" | 18 #include "net/http/http_network_layer.h" |
18 #include "net/http/http_server_properties_impl.h" | 19 #include "net/http/http_server_properties_impl.h" |
19 #include "net/http/http_transaction_factory.h" | 20 #include "net/http/http_transaction_factory.h" |
20 #include "net/proxy/proxy_service.h" | 21 #include "net/proxy/proxy_service.h" |
21 #include "net/socket/socket_test_util.h" | 22 #include "net/socket/socket_test_util.h" |
22 #include "net/url_request/url_request_context.h" | 23 #include "net/url_request/url_request_context.h" |
23 #include "net/url_request/url_request_context_storage.h" | 24 #include "net/url_request/url_request_context_storage.h" |
24 | 25 |
26 namespace crypto { | |
27 class ECSignatureCreatorFactory; | |
28 } | |
29 | |
25 namespace net { | 30 namespace net { |
26 | 31 |
27 namespace test_spdy3 { | 32 namespace test_spdy3 { |
28 | 33 |
29 // Default upload data used by both, mock objects and framer when creating | 34 // Default upload data used by both, mock objects and framer when creating |
30 // data frames. | 35 // data frames. |
31 const char kDefaultURL[] = "http://www.google.com"; | 36 const char kDefaultURL[] = "http://www.google.com"; |
32 const char kUploadData[] = "hello!"; | 37 const char kUploadData[] = "hello!"; |
33 const int kUploadDataSize = arraysize(kUploadData)-1; | 38 const int kUploadDataSize = arraysize(kUploadData)-1; |
34 | 39 |
(...skipping 380 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
415 DISALLOW_COPY_AND_ASSIGN(SpdySessionPoolPeer); | 420 DISALLOW_COPY_AND_ASSIGN(SpdySessionPoolPeer); |
416 }; | 421 }; |
417 | 422 |
418 // Helper to manage the state of a number of SPDY global variables. | 423 // Helper to manage the state of a number of SPDY global variables. |
419 class SpdyTestStateHelper { | 424 class SpdyTestStateHelper { |
420 public: | 425 public: |
421 SpdyTestStateHelper(); | 426 SpdyTestStateHelper(); |
422 ~SpdyTestStateHelper(); | 427 ~SpdyTestStateHelper(); |
423 | 428 |
424 private: | 429 private: |
430 // In order to make CREDENTIAL frame creation deterministic, we need to | |
431 // use a mock EC signature creator, which needs to live throughout | |
432 // the life of the test | |
433 scoped_ptr<crypto::ECSignatureCreatorFactory> ec_signature_creator_factory_; | |
ramant (doing other things)
2012/08/01 17:01:58
overly nit: punctuation.
http://google-styleguide
Ryan Hamilton
2012/08/01 18:03:22
Done. (Assuming you want a period on 432, not a c
| |
434 | |
425 DISALLOW_COPY_AND_ASSIGN(SpdyTestStateHelper); | 435 DISALLOW_COPY_AND_ASSIGN(SpdyTestStateHelper); |
426 }; | 436 }; |
427 | 437 |
428 } // namespace test_spdy3 | 438 } // namespace test_spdy3 |
429 | 439 |
430 } // namespace net | 440 } // namespace net |
431 | 441 |
432 #endif // NET_SPDY_SPDY_TEST_UTIL_H_ | 442 #endif // NET_SPDY_SPDY_TEST_UTIL_H_ |
OLD | NEW |