| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 "testing/gtest/include/gtest/gtest.h" | 5 #include "testing/gtest/include/gtest/gtest.h" |
| 6 | 6 |
| 7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
| 8 #include "base/stl_util-inl.h" | 8 #include "base/stl_util-inl.h" |
| 9 #include "base/string_util.h" | 9 #include "base/string_util.h" |
| 10 #include "base/utf_string_conversions.h" | 10 #include "base/utf_string_conversions.h" |
| 11 #include "chrome/browser/keychain_mock_mac.h" | 11 #include "chrome/browser/keychain_mock_mac.h" |
| 12 #include "chrome/browser/password_manager/password_store_mac.h" | 12 #include "chrome/browser/password_manager/password_store_mac.h" |
| 13 #include "chrome/browser/password_manager/password_store_mac_internal.h" | 13 #include "chrome/browser/password_manager/password_store_mac_internal.h" |
| 14 | 14 |
| 15 using webkit_glue::PasswordForm; | 15 using webkit_glue::PasswordForm; |
| 16 #if 0 |
| 16 | 17 |
| 17 class PasswordStoreMacTest : public testing::Test { | 18 class PasswordStoreMacTest : public testing::Test { |
| 18 public: | 19 public: |
| 19 virtual void SetUp() { | 20 virtual void SetUp() { |
| 20 MockKeychain::KeychainTestData test_data[] = { | 21 MockKeychain::KeychainTestData test_data[] = { |
| 21 // Basic HTML form. | 22 // Basic HTML form. |
| 22 { kSecAuthenticationTypeHTMLForm, "some.domain.com", | 23 { kSecAuthenticationTypeHTMLForm, "some.domain.com", |
| 23 kSecProtocolTypeHTTP, NULL, 0, NULL, "20020601171500Z", | 24 kSecProtocolTypeHTTP, NULL, 0, NULL, "20020601171500Z", |
| 24 "joe_user", "sekrit", false }, | 25 "joe_user", "sekrit", false }, |
| 25 // HTML form with path. | 26 // HTML form with path. |
| (...skipping 823 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 849 std::vector<PasswordForm*> all_passwords = | 850 std::vector<PasswordForm*> all_passwords = |
| 850 keychain_adapter.GetAllPasswordFormPasswords(); | 851 keychain_adapter.GetAllPasswordFormPasswords(); |
| 851 EXPECT_EQ(8 + arraysize(owned_password_data), all_passwords.size()); | 852 EXPECT_EQ(8 + arraysize(owned_password_data), all_passwords.size()); |
| 852 STLDeleteElements(&all_passwords); | 853 STLDeleteElements(&all_passwords); |
| 853 | 854 |
| 854 std::vector<PasswordForm*> owned_passwords = | 855 std::vector<PasswordForm*> owned_passwords = |
| 855 owned_keychain_adapter.GetAllPasswordFormPasswords(); | 856 owned_keychain_adapter.GetAllPasswordFormPasswords(); |
| 856 EXPECT_EQ(arraysize(owned_password_data), owned_passwords.size()); | 857 EXPECT_EQ(arraysize(owned_password_data), owned_passwords.size()); |
| 857 STLDeleteElements(&owned_passwords); | 858 STLDeleteElements(&owned_passwords); |
| 858 } | 859 } |
| 860 #endif |
| OLD | NEW |