| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "extensions/browser/api/cast_channel/cast_transport.h" | 5 #include "extensions/browser/api/cast_channel/cast_transport.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <queue> | 8 #include <queue> |
| 9 | 9 |
| 10 #include "base/test/simple_test_tick_clock.h" | 10 #include "base/test/simple_test_tick_clock.h" |
| (...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 138 number.push_back(192); | 138 number.push_back(192); |
| 139 number.push_back(0); | 139 number.push_back(0); |
| 140 number.push_back(0); | 140 number.push_back(0); |
| 141 number.push_back(1); | 141 number.push_back(1); |
| 142 ip_ = net::IPEndPoint(number, 8009); | 142 ip_ = net::IPEndPoint(number, 8009); |
| 143 } | 143 } |
| 144 | 144 |
| 145 virtual ~MockCastSocket() {} | 145 virtual ~MockCastSocket() {} |
| 146 | 146 |
| 147 // The IP endpoint for the destination of the channel. | 147 // The IP endpoint for the destination of the channel. |
| 148 virtual const net::IPEndPoint& ip_endpoint() const OVERRIDE { return ip_; } | 148 virtual const net::IPEndPoint& ip_endpoint() const override { return ip_; } |
| 149 | 149 |
| 150 // The authentication level requested for the channel. | 150 // The authentication level requested for the channel. |
| 151 virtual ChannelAuthType channel_auth() const OVERRIDE { | 151 virtual ChannelAuthType channel_auth() const override { |
| 152 return CHANNEL_AUTH_TYPE_SSL_VERIFIED; | 152 return CHANNEL_AUTH_TYPE_SSL_VERIFIED; |
| 153 } | 153 } |
| 154 | 154 |
| 155 virtual int id() const OVERRIDE { return 1; } | 155 virtual int id() const override { return 1; } |
| 156 | 156 |
| 157 MOCK_METHOD3(Write, | 157 MOCK_METHOD3(Write, |
| 158 int(net::IOBuffer* buffer, | 158 int(net::IOBuffer* buffer, |
| 159 size_t size, | 159 size_t size, |
| 160 const net::CompletionCallback& callback)); | 160 const net::CompletionCallback& callback)); |
| 161 MOCK_METHOD3(Read, | 161 MOCK_METHOD3(Read, |
| 162 int(net::IOBuffer* buf, | 162 int(net::IOBuffer* buf, |
| 163 int buf_len, | 163 int buf_len, |
| 164 const net::CompletionCallback& callback)); | 164 const net::CompletionCallback& callback)); |
| 165 MOCK_METHOD1(CloseWithError, void(ChannelError error)); | 165 MOCK_METHOD1(CloseWithError, void(ChannelError error)); |
| (...skipping 488 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 654 MessageFramer::MessageHeader::header_size()))) | 654 MessageFramer::MessageHeader::header_size()))) |
| 655 .RetiresOnSaturation(); | 655 .RetiresOnSaturation(); |
| 656 EXPECT_CALL(delegate_, | 656 EXPECT_CALL(delegate_, |
| 657 OnError(&mock_socket_, CHANNEL_ERROR_INVALID_MESSAGE, _)); | 657 OnError(&mock_socket_, CHANNEL_ERROR_INVALID_MESSAGE, _)); |
| 658 EXPECT_CALL(mock_socket_, CloseWithError(CHANNEL_ERROR_INVALID_MESSAGE)); | 658 EXPECT_CALL(mock_socket_, CloseWithError(CHANNEL_ERROR_INVALID_MESSAGE)); |
| 659 transport_->StartReadLoop(); | 659 transport_->StartReadLoop(); |
| 660 } | 660 } |
| 661 } // namespace cast_channel | 661 } // namespace cast_channel |
| 662 } // namespace core_api | 662 } // namespace core_api |
| 663 } // namespace extensions | 663 } // namespace extensions |
| OLD | NEW |