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

Side by Side Diff: ipc/ipc_message_attachment_set_posix_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/ipc_message_attachment_set.cc ('k') | ipc/ipc_message_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 // This test is POSIX only. 5 // This test is POSIX only.
6 6
7 #include "ipc/ipc_message_attachment_set.h" 7 #include "ipc/ipc_message_attachment_set.h"
8 8
9 #include <fcntl.h> 9 #include <fcntl.h>
10 #include <stddef.h>
10 #include <unistd.h> 11 #include <unistd.h>
11 12
12 #include "base/posix/eintr_wrapper.h" 13 #include "base/posix/eintr_wrapper.h"
14 #include "build/build_config.h"
13 #include "ipc/ipc_platform_file_attachment_posix.h" 15 #include "ipc/ipc_platform_file_attachment_posix.h"
14 #include "testing/gtest/include/gtest/gtest.h" 16 #include "testing/gtest/include/gtest/gtest.h"
15 17
16 namespace IPC { 18 namespace IPC {
17 namespace { 19 namespace {
18 20
19 // Get a safe file descriptor for test purposes. 21 // Get a safe file descriptor for test purposes.
20 int GetSafeFd() { 22 int GetSafeFd() {
21 return open("/dev/null", O_RDONLY); 23 return open("/dev/null", O_RDONLY);
22 } 24 }
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
209 const int fd = GetSafeFd(); 211 const int fd = GetSafeFd();
210 ASSERT_TRUE(set->AddAttachment( 212 ASSERT_TRUE(set->AddAttachment(
211 new internal::PlatformFileAttachment(base::ScopedFD(fd)))); 213 new internal::PlatformFileAttachment(base::ScopedFD(fd))));
212 set->CommitAllDescriptors(); 214 set->CommitAllDescriptors();
213 215
214 ASSERT_TRUE(VerifyClosed(fd)); 216 ASSERT_TRUE(VerifyClosed(fd));
215 } 217 }
216 218
217 } // namespace 219 } // namespace
218 } // namespace IPC 220 } // namespace IPC
OLDNEW
« no previous file with comments | « ipc/ipc_message_attachment_set.cc ('k') | ipc/ipc_message_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698