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

Side by Side Diff: jingle/glue/fake_ssl_client_socket_unittest.cc

Issue 2525743002: Make URLRequestContext a MemoryDumpProvider (Abandoned) (Closed)
Patch Set: rebased to 7f3d142161b15869f6bea58ac43c5f52ce5834ac Created 4 years 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
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 #include "jingle/glue/fake_ssl_client_socket.h" 5 #include "jingle/glue/fake_ssl_client_socket.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 MOCK_CONST_METHOD0(UsingTCPFastOpen, bool()); 71 MOCK_CONST_METHOD0(UsingTCPFastOpen, bool());
72 MOCK_CONST_METHOD0(NumBytesRead, int64_t()); 72 MOCK_CONST_METHOD0(NumBytesRead, int64_t());
73 MOCK_CONST_METHOD0(GetConnectTimeMicros, base::TimeDelta()); 73 MOCK_CONST_METHOD0(GetConnectTimeMicros, base::TimeDelta());
74 MOCK_CONST_METHOD0(WasNpnNegotiated, bool()); 74 MOCK_CONST_METHOD0(WasNpnNegotiated, bool());
75 MOCK_CONST_METHOD0(GetNegotiatedProtocol, net::NextProto()); 75 MOCK_CONST_METHOD0(GetNegotiatedProtocol, net::NextProto());
76 MOCK_METHOD1(GetSSLInfo, bool(net::SSLInfo*)); 76 MOCK_METHOD1(GetSSLInfo, bool(net::SSLInfo*));
77 MOCK_CONST_METHOD1(GetConnectionAttempts, void(net::ConnectionAttempts*)); 77 MOCK_CONST_METHOD1(GetConnectionAttempts, void(net::ConnectionAttempts*));
78 MOCK_METHOD0(ClearConnectionAttempts, void()); 78 MOCK_METHOD0(ClearConnectionAttempts, void());
79 MOCK_METHOD1(AddConnectionAttempts, void(const net::ConnectionAttempts&)); 79 MOCK_METHOD1(AddConnectionAttempts, void(const net::ConnectionAttempts&));
80 MOCK_CONST_METHOD0(GetTotalReceivedBytes, int64_t()); 80 MOCK_CONST_METHOD0(GetTotalReceivedBytes, int64_t());
81 MOCK_CONST_METHOD1(DumpMemoryStats,
82 void(base::trace_event::MemoryAllocatorDump* dump));
81 }; 83 };
82 84
83 // Break up |data| into a bunch of chunked MockReads/Writes and push 85 // Break up |data| into a bunch of chunked MockReads/Writes and push
84 // them onto |ops|. 86 // them onto |ops|.
85 template <net::MockReadWriteType type> 87 template <net::MockReadWriteType type>
86 void AddChunkedOps(base::StringPiece data, size_t chunk_size, net::IoMode mode, 88 void AddChunkedOps(base::StringPiece data, size_t chunk_size, net::IoMode mode,
87 std::vector<net::MockReadWrite<type> >* ops) { 89 std::vector<net::MockReadWrite<type> >* ops) {
88 DCHECK_GT(chunk_size, 0U); 90 DCHECK_GT(chunk_size, 0U);
89 size_t offset = 0; 91 size_t offset = 0;
90 while (offset < data.size()) { 92 while (offset < data.size()) {
(...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after
349 } 351 }
350 352
351 TEST_F(FakeSSLClientSocketTest, MalformedServerHello) { 353 TEST_F(FakeSSLClientSocketTest, MalformedServerHello) {
352 RunUnsuccessfulHandshakeTest(ERR_MALFORMED_SERVER_HELLO, 354 RunUnsuccessfulHandshakeTest(ERR_MALFORMED_SERVER_HELLO,
353 VERIFY_SERVER_HELLO_ERROR); 355 VERIFY_SERVER_HELLO_ERROR);
354 } 356 }
355 357
356 } // namespace 358 } // namespace
357 359
358 } // namespace jingle_glue 360 } // namespace jingle_glue
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698