Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(38)

Side by Side Diff: base/posix/unix_domain_socket_linux_unittest.cc

Issue 1466413002: Update gtest to 786564fa4a3c, switch to googlemock in gtest Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 <sys/socket.h> 5 #include <sys/socket.h>
6 #include <sys/types.h> 6 #include <sys/types.h>
7 #include <unistd.h> 7 #include <unistd.h>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
11 #include "base/files/file_util.h" 11 #include "base/files/file_util.h"
12 #include "base/files/scoped_file.h" 12 #include "base/files/scoped_file.h"
13 #include "base/location.h" 13 #include "base/location.h"
14 #include "base/memory/scoped_vector.h" 14 #include "base/memory/scoped_vector.h"
15 #include "base/pickle.h" 15 #include "base/pickle.h"
16 #include "base/posix/unix_domain_socket_linux.h" 16 #include "base/posix/unix_domain_socket_linux.h"
17 #include "base/single_thread_task_runner.h" 17 #include "base/single_thread_task_runner.h"
18 #include "base/synchronization/waitable_event.h" 18 #include "base/synchronization/waitable_event.h"
19 #include "base/threading/thread.h" 19 #include "base/threading/thread.h"
20 #include "testing/gtest/include/gtest/gtest.h" 20 #include "testing/gtest/googletest/include/gtest/gtest.h"
21 21
22 namespace base { 22 namespace base {
23 23
24 namespace { 24 namespace {
25 25
26 TEST(UnixDomainSocketTest, SendRecvMsgAbortOnReplyFDClose) { 26 TEST(UnixDomainSocketTest, SendRecvMsgAbortOnReplyFDClose) {
27 Thread message_thread("UnixDomainSocketTest"); 27 Thread message_thread("UnixDomainSocketTest");
28 ASSERT_TRUE(message_thread.Start()); 28 ASSERT_TRUE(message_thread.Start());
29 29
30 int fds[2]; 30 int fds[2];
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 const ssize_t nread = UnixDomainSocket::RecvMsgWithPid( 152 const ssize_t nread = UnixDomainSocket::RecvMsgWithPid(
153 recv_sock.get(), &ch, sizeof(ch), &recv_fds, &sender_pid); 153 recv_sock.get(), &ch, sizeof(ch), &recv_fds, &sender_pid);
154 ASSERT_EQ(0, nread); 154 ASSERT_EQ(0, nread);
155 ASSERT_EQ(-1, sender_pid); 155 ASSERT_EQ(-1, sender_pid);
156 ASSERT_EQ(0U, recv_fds.size()); 156 ASSERT_EQ(0U, recv_fds.size());
157 } 157 }
158 158
159 } // namespace 159 } // namespace
160 160
161 } // namespace base 161 } // namespace base
OLDNEW
« no previous file with comments | « base/posix/file_descriptor_shuffle_unittest.cc ('k') | base/power_monitor/power_monitor_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698