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

Side by Side Diff: chromecast/base/process_utils_unittest.cc

Issue 1198153003: cast_shell_android buildfix: remove stderr reference. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 6 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 | « no previous file | 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "chromecast/base/process_utils.h" 5 #include "chromecast/base/process_utils.h"
6 #include "testing/gtest/include/gtest/gtest.h" 6 #include "testing/gtest/include/gtest/gtest.h"
7 7
8 namespace chromecast { 8 namespace chromecast {
9 9
10 // Verify that a simple process works as expected. 10 // Verify that a simple process works as expected.
(...skipping 26 matching lines...) Expand all
37 // Verify that false is returned when a command an error code. 37 // Verify that false is returned when a command an error code.
38 TEST(ProcessUtilsTest, ProcessReturnsError) { 38 TEST(ProcessUtilsTest, ProcessReturnsError) {
39 // Create a simple command. 39 // Create a simple command.
40 std::vector<std::string> args; 40 std::vector<std::string> args;
41 args.push_back("cd"); 41 args.push_back("cd");
42 args.push_back("path/to/invalid/directory"); 42 args.push_back("path/to/invalid/directory");
43 args.push_back("2>&1"); // Pipe the stderr into stdout. 43 args.push_back("2>&1"); // Pipe the stderr into stdout.
44 44
45 // Execute the command and collect the output. Verify that the output of the 45 // Execute the command and collect the output. Verify that the output of the
46 // process is collected, even when the process returns an error code. 46 // process is collected, even when the process returns an error code.
47 std::string stderr; 47 std::string stderr_result;
48 ASSERT_FALSE(GetAppOutput(args, &stderr)); 48 ASSERT_FALSE(GetAppOutput(args, &stderr_result));
49 ASSERT_FALSE(stderr.empty()); 49 ASSERT_FALSE(stderr_result.empty());
50 } 50 }
51 51
52 } // namespace chromecast 52 } // namespace chromecast
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698