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

Side by Side Diff: components/os_crypt/ie7_password_win_unittest.cc

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/ie7_password_win.cc ('k') | components/os_crypt/keychain_password_mac.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/ie7_password_win.h" 5 #include "components/os_crypt/ie7_password_win.h"
6 6
7 #include <windows.h> 7 #include <windows.h>
8 8
9 #include <vector> 9 #include <vector>
10 10
11 #include "testing/gtest/include/gtest/gtest.h" 11 #include "testing/gtest/include/gtest/gtest.h"
12 12
13 TEST(IE7PasswordTest, GetUserPassword) { 13 TEST(IE7PasswordTest, GetUserPassword) {
14 // This is the unencrypted values of my keys under Storage2. 14 // This is the unencrypted values of my keys under Storage2.
15 // The passwords have been manually changed to abcdef... but the size remains 15 // The passwords have been manually changed to abcdef... but the size remains
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 std::vector<ie7_password::DecryptedCredentials> credentials; 81 std::vector<ie7_password::DecryptedCredentials> credentials;
82 ASSERT_TRUE(ie7_password::GetUserPassFromData(decrypted_data, &credentials)); 82 ASSERT_TRUE(ie7_password::GetUserPassFromData(decrypted_data, &credentials));
83 ASSERT_EQ(3u, credentials.size()); 83 ASSERT_EQ(3u, credentials.size());
84 EXPECT_EQ(L"qwer", credentials[0].username); 84 EXPECT_EQ(L"qwer", credentials[0].username);
85 EXPECT_EQ(L"qwerty", credentials[0].password); 85 EXPECT_EQ(L"qwerty", credentials[0].password);
86 EXPECT_EQ(L"asdf", credentials[1].username); 86 EXPECT_EQ(L"asdf", credentials[1].username);
87 EXPECT_EQ(L"asdfgh", credentials[1].password); 87 EXPECT_EQ(L"asdfgh", credentials[1].password);
88 EXPECT_EQ(L"zxcv", credentials[2].username); 88 EXPECT_EQ(L"zxcv", credentials[2].username);
89 EXPECT_EQ(L"zxcvbn", credentials[2].password); 89 EXPECT_EQ(L"zxcvbn", credentials[2].password);
90 } 90 }
OLDNEW
« no previous file with comments | « components/os_crypt/ie7_password_win.cc ('k') | components/os_crypt/keychain_password_mac.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698