OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #define _CRT_SECURE_NO_WARNINGS | 5 #define _CRT_SECURE_NO_WARNINGS |
6 | 6 |
7 #include <limits> | 7 #include <limits> |
8 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/debug/alias.h" | 10 #include "base/debug/alias.h" |
(...skipping 665 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
676 EXPECT_STREQ("foobar42", output.c_str()); | 676 EXPECT_STREQ("foobar42", output.c_str()); |
677 #endif // defined(OS_ANDROID) | 677 #endif // defined(OS_ANDROID) |
678 } | 678 } |
679 | 679 |
680 // Flakes on Android, crbug.com/375840 | 680 // Flakes on Android, crbug.com/375840 |
681 #if defined(OS_ANDROID) | 681 #if defined(OS_ANDROID) |
682 #define MAYBE_GetAppOutputRestricted DISABLED_GetAppOutputRestricted | 682 #define MAYBE_GetAppOutputRestricted DISABLED_GetAppOutputRestricted |
683 #else | 683 #else |
684 #define MAYBE_GetAppOutputRestricted GetAppOutputRestricted | 684 #define MAYBE_GetAppOutputRestricted GetAppOutputRestricted |
685 #endif | 685 #endif |
686 TEST_F(ProcessUtilTest, GetAppOutputRestricted) { | 686 TEST_F(ProcessUtilTest, MAYBE_GetAppOutputRestricted) { |
687 // Unfortunately, since we can't rely on the path, we need to know where | 687 // Unfortunately, since we can't rely on the path, we need to know where |
688 // everything is. So let's use /bin/sh, which is on every POSIX system, and | 688 // everything is. So let's use /bin/sh, which is on every POSIX system, and |
689 // its built-ins. | 689 // its built-ins. |
690 std::vector<std::string> argv; | 690 std::vector<std::string> argv; |
691 argv.push_back(std::string(kShellPath)); // argv[0] | 691 argv.push_back(std::string(kShellPath)); // argv[0] |
692 argv.push_back("-c"); // argv[1] | 692 argv.push_back("-c"); // argv[1] |
693 | 693 |
694 // On success, should set |output|. We use |/bin/sh -c 'exit 0'| instead of | 694 // On success, should set |output|. We use |/bin/sh -c 'exit 0'| instead of |
695 // |true| since the location of the latter may be |/bin| or |/usr/bin| (and we | 695 // |true| since the location of the latter may be |/bin| or |/usr/bin| (and we |
696 // need absolute paths). | 696 // need absolute paths). |
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
846 // Check that process was really killed. | 846 // Check that process was really killed. |
847 EXPECT_TRUE(IsProcessDead(child_process)); | 847 EXPECT_TRUE(IsProcessDead(child_process)); |
848 base::CloseProcessHandle(child_process); | 848 base::CloseProcessHandle(child_process); |
849 } | 849 } |
850 | 850 |
851 MULTIPROCESS_TEST_MAIN(process_util_test_die_immediately) { | 851 MULTIPROCESS_TEST_MAIN(process_util_test_die_immediately) { |
852 return 0; | 852 return 0; |
853 } | 853 } |
854 | 854 |
855 #endif // defined(OS_POSIX) | 855 #endif // defined(OS_POSIX) |
OLD | NEW |