| 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 <errno.h> | 5 #include <errno.h> |
| 6 #include <fcntl.h> | 6 #include <fcntl.h> |
| 7 #include <poll.h> | 7 #include <poll.h> |
| 8 #include <sys/socket.h> | 8 #include <sys/socket.h> |
| 9 #include <sys/stat.h> | 9 #include <sys/stat.h> |
| 10 #include <sys/time.h> | 10 #include <sys/time.h> |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 #include "base/file_util.h" | 22 #include "base/file_util.h" |
| 23 #include "base/files/file_path.h" | 23 #include "base/files/file_path.h" |
| 24 #include "base/memory/ref_counted.h" | 24 #include "base/memory/ref_counted.h" |
| 25 #include "base/memory/scoped_ptr.h" | 25 #include "base/memory/scoped_ptr.h" |
| 26 #include "base/message_loop.h" | 26 #include "base/message_loop.h" |
| 27 #include "base/posix/eintr_wrapper.h" | 27 #include "base/posix/eintr_wrapper.h" |
| 28 #include "base/synchronization/condition_variable.h" | 28 #include "base/synchronization/condition_variable.h" |
| 29 #include "base/synchronization/lock.h" | 29 #include "base/synchronization/lock.h" |
| 30 #include "base/threading/platform_thread.h" | 30 #include "base/threading/platform_thread.h" |
| 31 #include "base/threading/thread.h" | 31 #include "base/threading/thread.h" |
| 32 #include "net/base/unix_domain_socket_posix.h" | 32 #include "net/socket/unix_domain_socket_posix.h" |
| 33 #include "testing/gtest/include/gtest/gtest.h" | 33 #include "testing/gtest/include/gtest/gtest.h" |
| 34 | 34 |
| 35 using std::queue; | 35 using std::queue; |
| 36 using std::string; | 36 using std::string; |
| 37 | 37 |
| 38 namespace net { | 38 namespace net { |
| 39 namespace { | 39 namespace { |
| 40 | 40 |
| 41 const char kSocketFilename[] = "unix_domain_socket_for_testing"; | 41 const char kSocketFilename[] = "unix_domain_socket_for_testing"; |
| 42 const char kInvalidSocketPath[] = "/invalid/path"; | 42 const char kInvalidSocketPath[] = "/invalid/path"; |
| (...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 304 | 304 |
| 305 // Send() must fail. | 305 // Send() must fail. |
| 306 ssize_t ret = HANDLE_EINTR(send(sock, kMsg, sizeof(kMsg), 0)); | 306 ssize_t ret = HANDLE_EINTR(send(sock, kMsg, sizeof(kMsg), 0)); |
| 307 ASSERT_EQ(-1, ret); | 307 ASSERT_EQ(-1, ret); |
| 308 ASSERT_EQ(EPIPE, errno); | 308 ASSERT_EQ(EPIPE, errno); |
| 309 ASSERT_FALSE(event_manager_->HasPendingEvent()); | 309 ASSERT_FALSE(event_manager_->HasPendingEvent()); |
| 310 } | 310 } |
| 311 | 311 |
| 312 } // namespace | 312 } // namespace |
| 313 } // namespace net | 313 } // namespace net |
| OLD | NEW |