OLD | NEW |
1 // Copyright (c) 2009-2010 The Chromium OS Authors. All rights reserved. | 1 // Copyright (c) 2009-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 // Creates credential stores for testing. This class is only used in prepping | 5 // Creates credential stores for testing. This class is only used in prepping |
6 // the test data for unit tests. | 6 // the test data for unit tests. |
7 | 7 |
8 #ifndef CRYPTOHOME_MAKE_TESTS_H_ | 8 #ifndef CRYPTOHOME_MAKE_TESTS_H_ |
9 #define CRYPTOHOME_MAKE_TESTS_H_ | 9 #define CRYPTOHOME_MAKE_TESTS_H_ |
10 | 10 |
11 #include <base/basictypes.h> | 11 #include <base/basictypes.h> |
12 #include <string> | 12 #include <string> |
13 | 13 |
14 namespace cryptohome { | 14 namespace cryptohome { |
15 | 15 |
16 struct TestUserInfo { | 16 struct TestUserInfo { |
17 const char* username; | 17 const char* username; |
18 const char* password; | 18 const char* password; |
19 bool create; | 19 bool create; |
20 bool use_old_format; | 20 bool use_old_format; |
21 const char* tracked_dirs[2]; | |
22 }; | 21 }; |
23 | 22 |
24 extern const TestUserInfo kDefaultUsers[]; | 23 extern const TestUserInfo kDefaultUsers[]; |
25 extern const size_t kDefaultUserCount; | 24 extern const size_t kDefaultUserCount; |
26 extern const TestUserInfo kAlternateUsers[]; | 25 extern const TestUserInfo kAlternateUsers[]; |
27 extern const size_t kAlternateUserCount; | 26 extern const size_t kAlternateUserCount; |
28 | 27 |
29 class MakeTests { | 28 class MakeTests { |
30 public: | 29 public: |
31 MakeTests(); | 30 MakeTests(); |
32 | 31 |
33 virtual ~MakeTests() { } | 32 virtual ~MakeTests() { } |
34 | 33 |
35 void InitTestData(const std::string& image_dir, | 34 void InitTestData(const std::string& image_dir, |
36 const TestUserInfo* test_users, | 35 const TestUserInfo* test_users, |
37 size_t test_user_count); | 36 size_t test_user_count); |
38 | 37 |
39 private: | 38 private: |
40 DISALLOW_COPY_AND_ASSIGN(MakeTests); | 39 DISALLOW_COPY_AND_ASSIGN(MakeTests); |
41 }; | 40 }; |
42 | 41 |
43 } // namespace cryptohome | 42 } // namespace cryptohome |
44 | 43 |
45 #endif // CRYPTOHOME_MAKE_TESTS_H_ | 44 #endif // CRYPTOHOME_MAKE_TESTS_H_ |
OLD | NEW |