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

Unified Diff: sandbox/linux/services/scoped_process_unittest.cc

Issue 197873014: Revert of Implement ScopedFD in terms of ScopedGeneric. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sandbox/linux/services/credentials_unittest.cc ('k') | sandbox/linux/services/yama.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sandbox/linux/services/scoped_process_unittest.cc
diff --git a/sandbox/linux/services/scoped_process_unittest.cc b/sandbox/linux/services/scoped_process_unittest.cc
index 2800bd725c4549c2a3001574e19f2394ef970d9b..7ae82bf866bbba3a340f8f31f85b9443765f03d9 100644
--- a/sandbox/linux/services/scoped_process_unittest.cc
+++ b/sandbox/linux/services/scoped_process_unittest.cc
@@ -13,7 +13,6 @@
#include "base/bind.h"
#include "base/callback.h"
#include "base/file_util.h"
-#include "base/files/scoped_file.h"
#include "base/logging.h"
#include "base/posix/eintr_wrapper.h"
#include "base/threading/platform_thread.h"
@@ -74,13 +73,13 @@
TEST(ScopedProcess, DiesForReal) {
int pipe_fds[2];
ASSERT_EQ(0, pipe(pipe_fds));
- base::ScopedFD read_end_closer(pipe_fds[0]);
- base::ScopedFD write_end_closer(pipe_fds[1]);
+ file_util::ScopedFDCloser read_end_closer(pipe_fds);
+ file_util::ScopedFDCloser write_end_closer(pipe_fds + 1);
{ ScopedProcess process(base::Bind(&DoExit)); }
// Close writing end of the pipe.
- write_end_closer.reset();
+ ASSERT_EQ(0, IGNORE_EINTR(close(pipe_fds[1])));
pipe_fds[1] = -1;
ASSERT_EQ(0, fcntl(pipe_fds[0], F_SETFL, O_NONBLOCK));
@@ -109,8 +108,8 @@
TEST(ScopedProcess, SynchronizationWorks) {
int pipe_fds[2];
ASSERT_EQ(0, pipe(pipe_fds));
- base::ScopedFD read_end_closer(pipe_fds[0]);
- base::ScopedFD write_end_closer(pipe_fds[1]);
+ file_util::ScopedFDCloser read_end_closer(pipe_fds);
+ file_util::ScopedFDCloser write_end_closer(pipe_fds + 1);
// Start a process with a closure that takes a little bit to run.
ScopedProcess process(
« no previous file with comments | « sandbox/linux/services/credentials_unittest.cc ('k') | sandbox/linux/services/yama.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698