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 "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
48 MOCK_METHOD1(GetStats, bool(cricket::ConnectionInfos* infos)); | 48 MOCK_METHOD1(GetStats, bool(cricket::ConnectionInfos* infos)); |
49 MOCK_CONST_METHOD0(IsDtlsActive, bool()); | 49 MOCK_CONST_METHOD0(IsDtlsActive, bool()); |
50 MOCK_CONST_METHOD1(GetSslRole, bool(rtc::SSLRole* role)); | 50 MOCK_CONST_METHOD1(GetSslRole, bool(rtc::SSLRole* role)); |
51 MOCK_METHOD1(SetSrtpCiphers, bool(const std::vector<std::string>& ciphers)); | 51 MOCK_METHOD1(SetSrtpCiphers, bool(const std::vector<std::string>& ciphers)); |
52 MOCK_METHOD1(GetSrtpCipher, bool(std::string* cipher)); | 52 MOCK_METHOD1(GetSrtpCipher, bool(std::string* cipher)); |
53 MOCK_METHOD1(GetSslCipher, bool(std::string* cipher)); | 53 MOCK_METHOD1(GetSslCipher, bool(std::string* cipher)); |
54 MOCK_CONST_METHOD0(GetLocalCertificate, | 54 MOCK_CONST_METHOD0(GetLocalCertificate, |
55 rtc::scoped_refptr<rtc::RTCCertificate>()); | 55 rtc::scoped_refptr<rtc::RTCCertificate>()); |
56 MOCK_CONST_METHOD1(GetRemoteSSLCertificate, | 56 MOCK_CONST_METHOD1(GetRemoteSSLCertificate, |
57 bool(rtc::SSLCertificate** cert)); | 57 bool(rtc::SSLCertificate** cert)); |
58 | |
59 // This can't be a real mock method because gmock doesn't support move-only | |
60 // return values. | |
61 virtual rtc::scoped_ptr<rtc::SSLCertificate> GetRemoteSSLCertificate() const { | |
Sergey Ulanov
2016/04/05 18:05:23
I think this should be marked as override instead
kwiberg-chromium
2016/04/06 08:14:51
This code must compile both before and after the p
| |
62 EXPECT_TRUE(false); // Never called. | |
63 return nullptr; | |
64 } | |
65 | |
58 MOCK_METHOD6(ExportKeyingMaterial, | 66 MOCK_METHOD6(ExportKeyingMaterial, |
59 bool(const std::string& label, | 67 bool(const std::string& label, |
60 const uint8_t* context, | 68 const uint8_t* context, |
61 size_t context_len, | 69 size_t context_len, |
62 bool use_context, | 70 bool use_context, |
63 uint8_t* result, | 71 uint8_t* result, |
64 size_t result_len)); | 72 size_t result_len)); |
65 }; | 73 }; |
66 | 74 |
67 class TransportChannelSocketAdapterTest : public testing::Test { | 75 class TransportChannelSocketAdapterTest : public testing::Test { |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
136 | 144 |
137 EXPECT_CALL(channel_, GetError()) | 145 EXPECT_CALL(channel_, GetError()) |
138 .WillOnce(Return(EWOULDBLOCK)); | 146 .WillOnce(Return(EWOULDBLOCK)); |
139 | 147 |
140 int result = target_->Send(buffer.get(), kTestDataSize, callback_); | 148 int result = target_->Send(buffer.get(), kTestDataSize, callback_); |
141 ASSERT_EQ(net::OK, result); | 149 ASSERT_EQ(net::OK, result); |
142 } | 150 } |
143 | 151 |
144 } // namespace protocol | 152 } // namespace protocol |
145 } // namespace remoting | 153 } // namespace remoting |
OLD | NEW |