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

Side by Side Diff: ipc/unix_domain_socket_util_unittest.cc

Issue 1546533002: Switch to standard integer types in ipc/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 12 months 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
« no previous file with comments | « ipc/unix_domain_socket_util.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 <stddef.h>
5 #include <sys/socket.h> 6 #include <sys/socket.h>
6 7
7 #include "base/bind.h" 8 #include "base/bind.h"
8 #include "base/files/file_path.h" 9 #include "base/files/file_path.h"
9 #include "base/location.h" 10 #include "base/location.h"
11 #include "base/macros.h"
10 #include "base/path_service.h" 12 #include "base/path_service.h"
11 #include "base/posix/eintr_wrapper.h" 13 #include "base/posix/eintr_wrapper.h"
12 #include "base/single_thread_task_runner.h" 14 #include "base/single_thread_task_runner.h"
13 #include "base/synchronization/waitable_event.h" 15 #include "base/synchronization/waitable_event.h"
14 #include "base/threading/thread.h" 16 #include "base/threading/thread.h"
15 #include "base/threading/thread_restrictions.h" 17 #include "base/threading/thread_restrictions.h"
16 #include "ipc/unix_domain_socket_util.h" 18 #include "ipc/unix_domain_socket_util.h"
17 #include "testing/gtest/include/gtest/gtest.h" 19 #include "testing/gtest/include/gtest/gtest.h"
18 20
19 namespace { 21 namespace {
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 HANDLE_EINTR(send(connection.client_fd(), buffer, buf_len, 0)); 166 HANDLE_EINTR(send(connection.client_fd(), buffer, buf_len, 0));
165 ASSERT_EQ(buf_len, sent_bytes); 167 ASSERT_EQ(buf_len, sent_bytes);
166 char recv_buf[sizeof(buffer)]; 168 char recv_buf[sizeof(buffer)];
167 size_t received_bytes = 169 size_t received_bytes =
168 HANDLE_EINTR(recv(connection.server_fd(), recv_buf, buf_len, 0)); 170 HANDLE_EINTR(recv(connection.server_fd(), recv_buf, buf_len, 0));
169 ASSERT_EQ(buf_len, received_bytes); 171 ASSERT_EQ(buf_len, received_bytes);
170 ASSERT_EQ(0, memcmp(recv_buf, buffer, buf_len)); 172 ASSERT_EQ(0, memcmp(recv_buf, buffer, buf_len));
171 } 173 }
172 174
173 } // namespace 175 } // namespace
OLDNEW
« no previous file with comments | « ipc/unix_domain_socket_util.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698