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

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

Issue 896393005: Add new method to get negotiated SSL cipher in jingle glue. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 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
« no previous file with comments | « AUTHORS ('k') | no next file » | 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 #include "base/memory/ref_counted.h" 5 #include "base/memory/ref_counted.h"
6 #include "base/memory/scoped_ptr.h" 6 #include "base/memory/scoped_ptr.h"
7 #include "base/message_loop/message_loop.h" 7 #include "base/message_loop/message_loop.h"
8 #include "jingle/glue/channel_socket_adapter.h" 8 #include "jingle/glue/channel_socket_adapter.h"
9 #include "net/base/io_buffer.h" 9 #include "net/base/io_buffer.h"
10 #include "net/base/net_errors.h" 10 #include "net/base/net_errors.h"
(...skipping 28 matching lines...) Expand all
39 const rtc::PacketOptions& options, 39 const rtc::PacketOptions& options,
40 int flags)); 40 int flags));
41 MOCK_METHOD2(SetOption, int(rtc::Socket::Option opt, int value)); 41 MOCK_METHOD2(SetOption, int(rtc::Socket::Option opt, int value));
42 MOCK_METHOD0(GetError, int()); 42 MOCK_METHOD0(GetError, int());
43 MOCK_CONST_METHOD0(GetIceRole, cricket::IceRole()); 43 MOCK_CONST_METHOD0(GetIceRole, cricket::IceRole());
44 MOCK_METHOD1(GetStats, bool(cricket::ConnectionInfos* infos)); 44 MOCK_METHOD1(GetStats, bool(cricket::ConnectionInfos* infos));
45 MOCK_CONST_METHOD0(IsDtlsActive, bool()); 45 MOCK_CONST_METHOD0(IsDtlsActive, bool());
46 MOCK_CONST_METHOD1(GetSslRole, bool(rtc::SSLRole* role)); 46 MOCK_CONST_METHOD1(GetSslRole, bool(rtc::SSLRole* role));
47 MOCK_METHOD1(SetSrtpCiphers, bool(const std::vector<std::string>& ciphers)); 47 MOCK_METHOD1(SetSrtpCiphers, bool(const std::vector<std::string>& ciphers));
48 MOCK_METHOD1(GetSrtpCipher, bool(std::string* cipher)); 48 MOCK_METHOD1(GetSrtpCipher, bool(std::string* cipher));
49 MOCK_METHOD1(GetSslCipher, bool(std::string* cipher));
49 MOCK_CONST_METHOD1(GetLocalIdentity, bool(rtc::SSLIdentity** identity)); 50 MOCK_CONST_METHOD1(GetLocalIdentity, bool(rtc::SSLIdentity** identity));
50 MOCK_CONST_METHOD1(GetRemoteCertificate, 51 MOCK_CONST_METHOD1(GetRemoteCertificate,
51 bool(rtc::SSLCertificate** cert)); 52 bool(rtc::SSLCertificate** cert));
52 MOCK_METHOD6(ExportKeyingMaterial, bool(const std::string& label, 53 MOCK_METHOD6(ExportKeyingMaterial, bool(const std::string& label,
53 const uint8* context, 54 const uint8* context,
54 size_t context_len, 55 size_t context_len,
55 bool use_context, 56 bool use_context,
56 uint8* result, 57 uint8* result,
57 size_t result_len)); 58 size_t result_len));
58 }; 59 };
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 .WillOnce(Return(SOCKET_ERROR)); 129 .WillOnce(Return(SOCKET_ERROR));
129 130
130 EXPECT_CALL(channel_, GetError()) 131 EXPECT_CALL(channel_, GetError())
131 .WillOnce(Return(EWOULDBLOCK)); 132 .WillOnce(Return(EWOULDBLOCK));
132 133
133 int result = target_->Write(buffer.get(), kTestDataSize, callback_); 134 int result = target_->Write(buffer.get(), kTestDataSize, callback_);
134 ASSERT_EQ(net::OK, result); 135 ASSERT_EQ(net::OK, result);
135 } 136 }
136 137
137 } // namespace jingle_glue 138 } // namespace jingle_glue
OLDNEW
« no previous file with comments | « AUTHORS ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698