OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "remoting/protocol/channel_socket_adapter.h" | 5 #include "remoting/protocol/channel_socket_adapter.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <memory> | 10 #include <memory> |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
47 MOCK_METHOD0(GetError, int()); | 47 MOCK_METHOD0(GetError, int()); |
48 MOCK_CONST_METHOD0(GetIceRole, cricket::IceRole()); | 48 MOCK_CONST_METHOD0(GetIceRole, cricket::IceRole()); |
49 MOCK_METHOD1(GetStats, bool(cricket::ConnectionInfos* infos)); | 49 MOCK_METHOD1(GetStats, bool(cricket::ConnectionInfos* infos)); |
50 MOCK_CONST_METHOD0(IsDtlsActive, bool()); | 50 MOCK_CONST_METHOD0(IsDtlsActive, bool()); |
51 MOCK_CONST_METHOD1(GetSslRole, bool(rtc::SSLRole* role)); | 51 MOCK_CONST_METHOD1(GetSslRole, bool(rtc::SSLRole* role)); |
52 MOCK_METHOD1(SetSrtpCiphers, bool(const std::vector<std::string>& ciphers)); | 52 MOCK_METHOD1(SetSrtpCiphers, bool(const std::vector<std::string>& ciphers)); |
53 MOCK_METHOD1(GetSrtpCipher, bool(std::string* cipher)); | 53 MOCK_METHOD1(GetSrtpCipher, bool(std::string* cipher)); |
54 MOCK_METHOD1(GetSslCipher, bool(std::string* cipher)); | 54 MOCK_METHOD1(GetSslCipher, bool(std::string* cipher)); |
55 MOCK_CONST_METHOD0(GetLocalCertificate, | 55 MOCK_CONST_METHOD0(GetLocalCertificate, |
56 rtc::scoped_refptr<rtc::RTCCertificate>()); | 56 rtc::scoped_refptr<rtc::RTCCertificate>()); |
57 MOCK_CONST_METHOD1(GetRemoteSSLCertificate, | |
58 bool(rtc::SSLCertificate** cert)); | |
59 | 57 |
60 // This can't be a real mock method because gmock doesn't support move-only | 58 // This can't be a real mock method because gmock doesn't support move-only |
61 // return values. | 59 // return values. |
62 virtual rtc::scoped_ptr<rtc::SSLCertificate> GetRemoteSSLCertificate() | 60 rtc::scoped_ptr<rtc::SSLCertificate> GetRemoteSSLCertificate() |
63 const { | 61 const override { |
64 EXPECT_TRUE(false); // Never called. | 62 EXPECT_TRUE(false); // Never called. |
65 return nullptr; | 63 return nullptr; |
66 } | 64 } |
67 | 65 |
68 MOCK_METHOD6(ExportKeyingMaterial, | 66 MOCK_METHOD6(ExportKeyingMaterial, |
69 bool(const std::string& label, | 67 bool(const std::string& label, |
70 const uint8_t* context, | 68 const uint8_t* context, |
71 size_t context_len, | 69 size_t context_len, |
72 bool use_context, | 70 bool use_context, |
73 uint8_t* result, | 71 uint8_t* result, |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
146 | 144 |
147 EXPECT_CALL(channel_, GetError()) | 145 EXPECT_CALL(channel_, GetError()) |
148 .WillOnce(Return(EWOULDBLOCK)); | 146 .WillOnce(Return(EWOULDBLOCK)); |
149 | 147 |
150 int result = target_->Send(buffer.get(), kTestDataSize, callback_); | 148 int result = target_->Send(buffer.get(), kTestDataSize, callback_); |
151 ASSERT_EQ(net::OK, result); | 149 ASSERT_EQ(net::OK, result); |
152 } | 150 } |
153 | 151 |
154 } // namespace protocol | 152 } // namespace protocol |
155 } // namespace remoting | 153 } // namespace remoting |
OLD | NEW |