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

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: Address nits Created 6 years, 2 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 | « chrome/browser/shell_integration_linux.cc ('k') | chromeos/process_proxy/process_proxy.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 0984ee214af5e61057788f9be364bcc9b26a37b0..f08a852867aaf19bb813b13de0e1952a51c097f1 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])));
« no previous file with comments | « chrome/browser/shell_integration_linux.cc ('k') | chromeos/process_proxy/process_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698