| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium OS Authors. All rights reserved. | 1 // Copyright (c) 2010 The Chromium OS 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 #ifndef LOGIN_MANAGER_MOCK_SYSTEM_UTILS_H_ | 5 #ifndef LOGIN_MANAGER_MOCK_SYSTEM_UTILS_H_ |
| 6 #define LOGIN_MANAGER_MOCK_SYSTEM_UTILS_H_ | 6 #define LOGIN_MANAGER_MOCK_SYSTEM_UTILS_H_ |
| 7 | 7 |
| 8 #include "login_manager/system_utils.h" | 8 #include "login_manager/system_utils.h" |
| 9 | 9 |
| 10 #include <unistd.h> | 10 #include <unistd.h> |
| 11 #include <gmock/gmock.h> | 11 #include <gmock/gmock.h> |
| 12 | 12 |
| 13 namespace login_manager { | 13 namespace login_manager { |
| 14 class MockSystemUtils : public SystemUtils { | 14 class MockSystemUtils : public SystemUtils { |
| 15 public: | 15 public: |
| 16 MockSystemUtils() {} | 16 MockSystemUtils() {} |
| 17 ~MockSystemUtils() {} | 17 ~MockSystemUtils() {} |
| 18 MOCK_METHOD2(kill, int(pid_t pid, int signal)); | 18 MOCK_METHOD3(kill, int(pid_t pid, uid_t uid, int signal)); |
| 19 MOCK_METHOD2(ChildIsGone, bool(pid_t child_spec, int timeout)); | 19 MOCK_METHOD2(ChildIsGone, bool(pid_t child_spec, int timeout)); |
| 20 MOCK_METHOD2(EnsureAndReturnSafeFileSize, | 20 MOCK_METHOD2(EnsureAndReturnSafeFileSize, |
| 21 bool(const FilePath& file, int32* file_size_32)); | 21 bool(const FilePath& file, int32* file_size_32)); |
| 22 MOCK_METHOD2(EnsureAndReturnSafeSize, | 22 MOCK_METHOD2(EnsureAndReturnSafeSize, |
| 23 bool(int64 size_64, int32* size_32)); | 23 bool(int64 size_64, int32* size_32)); |
| 24 }; | 24 }; |
| 25 } // namespace login_manager | 25 } // namespace login_manager |
| 26 | 26 |
| 27 #endif // LOGIN_MANAGER_MOCK_SYSTEM_UTILS_H_ | 27 #endif // LOGIN_MANAGER_MOCK_SYSTEM_UTILS_H_ |
| OLD | NEW |