OLD | NEW |
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 "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/file_util.h" | 8 #include "base/file_util.h" |
9 #include "base/path_service.h" | 9 #include "base/path_service.h" |
10 #include "base/scoped_temp_dir.h" | 10 #include "base/scoped_temp_dir.h" |
11 #include "base/string_number_conversions.h" | 11 #include "base/string_number_conversions.h" |
12 #include "base/time.h" | 12 #include "base/time.h" |
13 #include "base/utf_string_conversions.h" | 13 #include "base/utf_string_conversions.h" |
14 #include "chrome/browser/password_manager/login_database.h" | 14 #include "chrome/browser/password_manager/login_database.h" |
15 #include "chrome/common/chrome_paths.h" | 15 #include "chrome/common/chrome_paths.h" |
16 #include "webkit/forms/password_form.h" | 16 #include "content/public/common/password_form.h" |
17 | 17 |
18 using webkit::forms::PasswordForm; | 18 using content::PasswordForm; |
19 | 19 |
20 class LoginDatabaseTest : public testing::Test { | 20 class LoginDatabaseTest : public testing::Test { |
21 protected: | 21 protected: |
22 virtual void SetUp() { | 22 virtual void SetUp() { |
23 ASSERT_TRUE(temp_dir_.CreateUniqueTempDir()); | 23 ASSERT_TRUE(temp_dir_.CreateUniqueTempDir()); |
24 file_ = temp_dir_.path().AppendASCII("TestMetadataStoreMacDatabase"); | 24 file_ = temp_dir_.path().AppendASCII("TestMetadataStoreMacDatabase"); |
25 } | 25 } |
26 | 26 |
27 FilePath file_; | 27 FilePath file_; |
28 ScopedTempDir temp_dir_; | 28 ScopedTempDir temp_dir_; |
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
268 // GetLogins should give the blacklisted result. | 268 // GetLogins should give the blacklisted result. |
269 EXPECT_TRUE(db->GetLogins(form, &result)); | 269 EXPECT_TRUE(db->GetLogins(form, &result)); |
270 EXPECT_EQ(1U, result.size()); | 270 EXPECT_EQ(1U, result.size()); |
271 ClearResults(&result); | 271 ClearResults(&result); |
272 | 272 |
273 // So should GetAllBlacklistedLogins. | 273 // So should GetAllBlacklistedLogins. |
274 EXPECT_TRUE(db->GetBlacklistLogins(&result)); | 274 EXPECT_TRUE(db->GetBlacklistLogins(&result)); |
275 EXPECT_EQ(1U, result.size()); | 275 EXPECT_EQ(1U, result.size()); |
276 ClearResults(&result); | 276 ClearResults(&result); |
277 } | 277 } |
OLD | NEW |