Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(243)

Side by Side Diff: net/spdy/spdy_test_util_spdy3.h

Issue 10832098: Simplify the EC signature creation code by moving it to a Helper. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix raman's comments Created 8 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « net/spdy/spdy_http_stream_spdy3_unittest.cc ('k') | net/spdy/spdy_test_util_spdy3.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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_;
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_
OLDNEW
« no previous file with comments | « net/spdy/spdy_http_stream_spdy3_unittest.cc ('k') | net/spdy/spdy_test_util_spdy3.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698