OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/fake_session.h" | 5 #include "remoting/protocol/fake_session.h" |
6 | 6 |
7 #include "base/message_loop.h" | 7 #include "base/message_loop.h" |
8 #include "net/base/io_buffer.h" | 8 #include "net/base/io_buffer.h" |
9 #include "net/base/net_errors.h" | 9 #include "net/base/net_errors.h" |
10 #include "testing/gtest/include/gtest/gtest.h" | 10 #include "testing/gtest/include/gtest/gtest.h" |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
73 } | 73 } |
74 bool FakeSocket::SetSendBufferSize(int32 size) { | 74 bool FakeSocket::SetSendBufferSize(int32 size) { |
75 NOTIMPLEMENTED(); | 75 NOTIMPLEMENTED(); |
76 return false; | 76 return false; |
77 } | 77 } |
78 | 78 |
79 int FakeSocket::Connect(net::OldCompletionCallback* callback) { | 79 int FakeSocket::Connect(net::OldCompletionCallback* callback) { |
80 EXPECT_EQ(message_loop_, MessageLoop::current()); | 80 EXPECT_EQ(message_loop_, MessageLoop::current()); |
81 return net::OK; | 81 return net::OK; |
82 } | 82 } |
| 83 int FakeSocket::Connect(const net::CompletionCallback& callback) { |
| 84 EXPECT_EQ(message_loop_, MessageLoop::current()); |
| 85 return net::OK; |
| 86 } |
83 | 87 |
84 void FakeSocket::Disconnect() { | 88 void FakeSocket::Disconnect() { |
85 NOTIMPLEMENTED(); | 89 NOTIMPLEMENTED(); |
86 } | 90 } |
87 | 91 |
88 bool FakeSocket::IsConnected() const { | 92 bool FakeSocket::IsConnected() const { |
89 EXPECT_EQ(message_loop_, MessageLoop::current()); | 93 EXPECT_EQ(message_loop_, MessageLoop::current()); |
90 return true; | 94 return true; |
91 } | 95 } |
92 | 96 |
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
260 void FakeSession::set_config(const SessionConfig& config) { | 264 void FakeSession::set_config(const SessionConfig& config) { |
261 config_ = config; | 265 config_ = config; |
262 } | 266 } |
263 | 267 |
264 void FakeSession::Close() { | 268 void FakeSession::Close() { |
265 closed_ = true; | 269 closed_ = true; |
266 } | 270 } |
267 | 271 |
268 } // namespace protocol | 272 } // namespace protocol |
269 } // namespace remoting | 273 } // namespace remoting |
OLD | NEW |