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

Side by Side Diff: components/webdata/encryptor/encryptor_password_mac_unittest.cc

Issue 12902030: Make Encryptor a component. Used by //chrome and (soon) //components/webdata. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove duplicate include. Created 7 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
OLDNEW
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 #include "chrome/browser/password_manager/encryptor_password_mac.h" 5 #include "components/webdata/encryptor/encryptor_password_mac.h"
6 #include "crypto/mock_apple_keychain.h" 6 #include "crypto/mock_apple_keychain.h"
7 #include "testing/gtest/include/gtest/gtest.h" 7 #include "testing/gtest/include/gtest/gtest.h"
8 8
9 namespace { 9 namespace {
10 10
11 using crypto::MockAppleKeychain; 11 using crypto::MockAppleKeychain;
12 12
13 // Test that if we have an existing password in the Keychain and we are 13 // Test that if we have an existing password in the Keychain and we are
14 // authorized by the user to read it then we get it back correctly. 14 // authorized by the user to read it then we get it back correctly.
15 TEST(EncryptorPasswordTest, FindPasswordSuccess) { 15 TEST(EncryptorPasswordTest, FindPasswordSuccess) {
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 std::string password2 = encryptor_password2.GetEncryptorPassword(); 70 std::string password2 = encryptor_password2.GetEncryptorPassword();
71 EXPECT_FALSE(password2.empty()); 71 EXPECT_FALSE(password2.empty());
72 EXPECT_TRUE(keychain2.called_add_generic()); 72 EXPECT_TRUE(keychain2.called_add_generic());
73 EXPECT_EQ(0, keychain2.password_data_count()); 73 EXPECT_EQ(0, keychain2.password_data_count());
74 74
75 // And finally check that the passwords are different. 75 // And finally check that the passwords are different.
76 EXPECT_NE(password1, password2); 76 EXPECT_NE(password1, password2);
77 } 77 }
78 78
79 } // namespace 79 } // namespace
OLDNEW
« no previous file with comments | « components/webdata/encryptor/encryptor_password_mac.mm ('k') | components/webdata/encryptor/encryptor_posix.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698