| 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 | 5 // Creates credential stores for testing |
| 6 | 6 |
| 7 #include "make_tests.h" | 7 #include "make_tests.h" |
| 8 | 8 |
| 9 #include <base/file_path.h> | 9 #include <base/file_path.h> |
| 10 #include <base/file_util.h> | 10 #include <base/file_util.h> |
| (...skipping 27 matching lines...) Expand all Loading... |
| 38 {"testuser4@invalid.domain", "four", true, false}, | 38 {"testuser4@invalid.domain", "four", true, false}, |
| 39 {"testuser5@invalid.domain", "five", false, false}, | 39 {"testuser5@invalid.domain", "five", false, false}, |
| 40 {"testuser6@invalid.domain", "six", true, false}, | 40 {"testuser6@invalid.domain", "six", true, false}, |
| 41 {"testuser7@invalid.domain", "seven", true, true}, | 41 {"testuser7@invalid.domain", "seven", true, true}, |
| 42 {"testuser8@invalid.domain", "eight", true, false}, | 42 {"testuser8@invalid.domain", "eight", true, false}, |
| 43 {"testuser9@invalid.domain", "nine", true, false}, | 43 {"testuser9@invalid.domain", "nine", true, false}, |
| 44 {"testuser10@invalid.domain", "ten", true, false}, | 44 {"testuser10@invalid.domain", "ten", true, false}, |
| 45 {"testuser11@invalid.domain", "eleven", true, false}, | 45 {"testuser11@invalid.domain", "eleven", true, false}, |
| 46 {"testuser12@invalid.domain", "twelve", false, false}, | 46 {"testuser12@invalid.domain", "twelve", false, false}, |
| 47 }; | 47 }; |
| 48 const size_t kDefaultUserCount = | 48 const size_t kDefaultUserCount = arraysize(kDefaultUsers); |
| 49 sizeof(kDefaultUsers) / sizeof(kDefaultUsers[0]); | |
| 50 | 49 |
| 50 // Used for tracking directories clean-up tests. |
| 51 const TestUserInfo kAlternateUsers[] = { | 51 const TestUserInfo kAlternateUsers[] = { |
| 52 {"altuser0@invalid.domain", "zero", true, false}, | 52 {"altuser0@invalid.domain", "zero", true, false}, |
| 53 {"altuser1@invalid.domain", "odin", true, false}, | 53 {"altuser1@invalid.domain", "odin", true, false}, |
| 54 {"altuser2@invalid.domain", "dwaa", true, false}, |
| 54 }; | 55 }; |
| 55 const size_t kAlternateUserCount = | 56 const size_t kAlternateUserCount = arraysize(kAlternateUsers); |
| 56 sizeof(kAlternateUsers) / sizeof(kAlternateUsers[0]); | |
| 57 | 57 |
| 58 MakeTests::MakeTests() { | 58 MakeTests::MakeTests() { |
| 59 } | 59 } |
| 60 | 60 |
| 61 void MakeTests::InitTestData(const std::string& image_dir, | 61 void MakeTests::InitTestData(const std::string& image_dir, |
| 62 const TestUserInfo* test_users, | 62 const TestUserInfo* test_users, |
| 63 size_t test_user_count) { | 63 size_t test_user_count) { |
| 64 if (file_util::PathExists(FilePath(image_dir))) { | 64 if (file_util::PathExists(FilePath(image_dir))) { |
| 65 file_util::Delete(FilePath(image_dir), true); | 65 file_util::Delete(FilePath(image_dir), true); |
| 66 } | 66 } |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 111 &error)) { | 111 &error)) { |
| 112 mount.RemoveOldFiles(up); | 112 mount.RemoveOldFiles(up); |
| 113 mount.SaveVaultKeysetOld(up, vault_keyset); | 113 mount.SaveVaultKeysetOld(up, vault_keyset); |
| 114 } | 114 } |
| 115 } | 115 } |
| 116 } | 116 } |
| 117 } | 117 } |
| 118 } | 118 } |
| 119 | 119 |
| 120 } // namespace cryptohome | 120 } // namespace cryptohome |
| OLD | NEW |