OLD | NEW |
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 "remoting/protocol/buffered_socket_writer.h" | 5 #include "remoting/protocol/buffered_socket_writer.h" |
6 | 6 |
7 #include <stdlib.h> | 7 #include <stdlib.h> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/message_loop.h" | 10 #include "base/message_loop/message_loop.h" |
11 #include "net/base/io_buffer.h" | 11 #include "net/base/io_buffer.h" |
12 #include "net/base/net_errors.h" | 12 #include "net/base/net_errors.h" |
13 #include "remoting/protocol/fake_session.h" | 13 #include "remoting/protocol/fake_session.h" |
14 #include "testing/gmock/include/gmock/gmock.h" | 14 #include "testing/gmock/include/gmock/gmock.h" |
15 #include "testing/gtest/include/gtest/gtest.h" | 15 #include "testing/gtest/include/gtest/gtest.h" |
16 | 16 |
17 namespace remoting { | 17 namespace remoting { |
18 namespace protocol { | 18 namespace protocol { |
19 | 19 |
20 namespace { | 20 namespace { |
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
179 socket_->set_next_write_error(net::ERR_FAILED); | 179 socket_->set_next_write_error(net::ERR_FAILED); |
180 message_loop_.RunUntilIdle(); | 180 message_loop_.RunUntilIdle(); |
181 EXPECT_EQ(net::ERR_FAILED, write_error_); | 181 EXPECT_EQ(net::ERR_FAILED, write_error_); |
182 EXPECT_EQ(static_cast<size_t>(test_buffer_->size()), | 182 EXPECT_EQ(static_cast<size_t>(test_buffer_->size()), |
183 socket_->written_data().size()); | 183 socket_->written_data().size()); |
184 } | 184 } |
185 | 185 |
186 } // namespace protocol | 186 } // namespace protocol |
187 } // namespace remoting | 187 } // namespace remoting |
188 | 188 |
OLD | NEW |