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

Side by Side Diff: components/os_crypt/keychain_password_mac_unittest.mm

Issue 200713005: components: Rename encryptor directory to os_crypt. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « components/os_crypt/keychain_password_mac.mm ('k') | components/os_crypt/os_crypt.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "components/encryptor/keychain_password_mac.h" 5 #include "components/os_crypt/keychain_password_mac.h"
6 6
7 #include "crypto/mock_apple_keychain.h" 7 #include "crypto/mock_apple_keychain.h"
8 #include "testing/gtest/include/gtest/gtest.h" 8 #include "testing/gtest/include/gtest/gtest.h"
9 9
10 namespace { 10 namespace {
11 11
12 using crypto::MockAppleKeychain; 12 using crypto::MockAppleKeychain;
13 13
14 // Test that if we have an existing password in the Keychain and we are 14 // Test that if we have an existing password in the Keychain and we are
15 // authorized by the user to read it then we get it back correctly. 15 // authorized by the user to read it then we get it back correctly.
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 std::string password2 = encryptor_password2.GetPassword(); 71 std::string password2 = encryptor_password2.GetPassword();
72 EXPECT_FALSE(password2.empty()); 72 EXPECT_FALSE(password2.empty());
73 EXPECT_TRUE(keychain2.called_add_generic()); 73 EXPECT_TRUE(keychain2.called_add_generic());
74 EXPECT_EQ(0, keychain2.password_data_count()); 74 EXPECT_EQ(0, keychain2.password_data_count());
75 75
76 // And finally check that the passwords are different. 76 // And finally check that the passwords are different.
77 EXPECT_NE(password1, password2); 77 EXPECT_NE(password1, password2);
78 } 78 }
79 79
80 } // namespace 80 } // namespace
OLDNEW
« no previous file with comments | « components/os_crypt/keychain_password_mac.mm ('k') | components/os_crypt/os_crypt.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698