| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "google_apis/gcm/base/socket_stream.h" | 5 #include "google_apis/gcm/base/socket_stream.h" |
| 6 | 6 |
| 7 #include <stdint.h> | 7 #include <stdint.h> |
| 8 | 8 |
| 9 #include <memory> | 9 #include <memory> |
| 10 | 10 |
| 11 #include "base/bind.h" | 11 #include "base/bind.h" |
| 12 #include "base/macros.h" | 12 #include "base/macros.h" |
| 13 #include "base/message_loop/message_loop.h" |
| 13 #include "base/run_loop.h" | 14 #include "base/run_loop.h" |
| 14 #include "base/strings/string_piece.h" | 15 #include "base/strings/string_piece.h" |
| 15 #include "net/base/ip_address.h" | 16 #include "net/base/ip_address.h" |
| 16 #include "net/log/net_log_source.h" | 17 #include "net/log/net_log_source.h" |
| 17 #include "net/socket/socket_test_util.h" | 18 #include "net/socket/socket_test_util.h" |
| 18 #include "testing/gtest/include/gtest/gtest.h" | 19 #include "testing/gtest/include/gtest/gtest.h" |
| 19 | 20 |
| 20 namespace gcm { | 21 namespace gcm { |
| 21 namespace { | 22 namespace { |
| 22 | 23 |
| (...skipping 370 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 393 TEST_F(GCMSocketStreamTest, WriteDisconnected) { | 394 TEST_F(GCMSocketStreamTest, WriteDisconnected) { |
| 394 BuildSocket(ReadList(), WriteList()); | 395 BuildSocket(ReadList(), WriteList()); |
| 395 socket()->Disconnect(); | 396 socket()->Disconnect(); |
| 396 DoOutputStreamWrite(base::StringPiece(kWriteData, kWriteDataSize)); | 397 DoOutputStreamWrite(base::StringPiece(kWriteData, kWriteDataSize)); |
| 397 ASSERT_EQ(SocketOutputStream::CLOSED, output_stream()->GetState()); | 398 ASSERT_EQ(SocketOutputStream::CLOSED, output_stream()->GetState()); |
| 398 ASSERT_EQ(net::ERR_CONNECTION_CLOSED, output_stream()->last_error()); | 399 ASSERT_EQ(net::ERR_CONNECTION_CLOSED, output_stream()->last_error()); |
| 399 } | 400 } |
| 400 | 401 |
| 401 } // namespace | 402 } // namespace |
| 402 } // namespace gcm | 403 } // namespace gcm |
| OLD | NEW |