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

Unified Diff: chromeos/process_proxy/process_output_watcher_unittest.cc

Issue 614893004: Refactor AppendToFile and WriteFileDescriptor (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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
Index: chromeos/process_proxy/process_output_watcher_unittest.cc
diff --git a/chromeos/process_proxy/process_output_watcher_unittest.cc b/chromeos/process_proxy/process_output_watcher_unittest.cc
index a3bdddf590cdfad620609e4f6f33018decec13a5..0754f745ca3ee457c9f71c9661a7a917bb2cebae 100644
--- a/chromeos/process_proxy/process_output_watcher_unittest.cc
+++ b/chromeos/process_proxy/process_output_watcher_unittest.cc
@@ -150,9 +150,8 @@ class ProcessOutputWatcherTest : public testing::Test {
ssize_t test_size = test_str.length() * sizeof(*test_str.c_str());
if (test_cases[i].should_send_terminating_null)
test_size += sizeof(*test_str.c_str());
- EXPECT_EQ(test_size,
- base::WriteFileDescriptor(pt_pipe[1], test_str.c_str(),
- test_size));
+ EXPECT_TRUE(base::WriteFileDescriptor(pt_pipe[1], test_str.c_str(),
+ test_size));
run_loop.Run();
EXPECT_TRUE(expectations_.IsDone());
@@ -161,7 +160,7 @@ class ProcessOutputWatcherTest : public testing::Test {
}
// Send stop signal. It is not important which string we send.
- EXPECT_EQ(1, base::WriteFileDescriptor(stop_pipe[1], "q", 1));
+ EXPECT_TRUE(base::WriteFileDescriptor(stop_pipe[1], "q", 1));
EXPECT_NE(-1, IGNORE_EINTR(close(stop_pipe[1])));
EXPECT_NE(-1, IGNORE_EINTR(close(pt_pipe[1])));

Powered by Google App Engine
This is Rietveld 408576698