| 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/base/buffered_socket_writer.h" | 5 #include "remoting/base/buffered_socket_writer.h" |
| 6 | 6 |
| 7 #include <stddef.h> |
| 7 #include <stdlib.h> | 8 #include <stdlib.h> |
| 8 | 9 |
| 9 #include "base/bind.h" | 10 #include "base/bind.h" |
| 10 #include "base/message_loop/message_loop.h" | 11 #include "base/message_loop/message_loop.h" |
| 11 #include "base/run_loop.h" | 12 #include "base/run_loop.h" |
| 12 #include "net/base/io_buffer.h" | 13 #include "net/base/io_buffer.h" |
| 13 #include "net/base/net_errors.h" | 14 #include "net/base/net_errors.h" |
| 14 #include "net/socket/socket_test_util.h" | 15 #include "net/socket/socket_test_util.h" |
| 15 #include "testing/gmock/include/gmock/gmock.h" | 16 #include "testing/gmock/include/gmock/gmock.h" |
| 16 #include "testing/gtest/include/gtest/gtest.h" | 17 #include "testing/gtest/include/gtest/gtest.h" |
| (...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 226 writer_->Write(test_buffer_2_, | 227 writer_->Write(test_buffer_2_, |
| 227 base::Bind(&BufferedSocketWriterTest::Unexpected, | 228 base::Bind(&BufferedSocketWriterTest::Unexpected, |
| 228 base::Unretained(this))); | 229 base::Unretained(this))); |
| 229 base::RunLoop().RunUntilIdle(); | 230 base::RunLoop().RunUntilIdle(); |
| 230 EXPECT_EQ(net::ERR_FAILED, write_error_); | 231 EXPECT_EQ(net::ERR_FAILED, write_error_); |
| 231 EXPECT_EQ(static_cast<size_t>(test_buffer_->size()), | 232 EXPECT_EQ(static_cast<size_t>(test_buffer_->size()), |
| 232 socket_data_provider_.written_data().size()); | 233 socket_data_provider_.written_data().size()); |
| 233 } | 234 } |
| 234 | 235 |
| 235 } // namespace remoting | 236 } // namespace remoting |
| OLD | NEW |