OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/gmock/include/gmock/gmock.h" | 5 #include "testing/gmock/include/gmock/gmock.h" |
6 #include "testing/gtest/include/gtest/gtest.h" | 6 #include "testing/gtest/include/gtest/gtest.h" |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/file_util.h" | 9 #include "base/file_util.h" |
10 #include "base/memory/scoped_temp_dir.h" | |
11 #include "base/path_service.h" | 10 #include "base/path_service.h" |
| 11 #include "base/scoped_temp_dir.h" |
12 #include "base/stl_util-inl.h" | 12 #include "base/stl_util-inl.h" |
13 #include "base/string_util.h" | 13 #include "base/string_util.h" |
14 #include "base/utf_string_conversions.h" | 14 #include "base/utf_string_conversions.h" |
15 #include "content/browser/browser_thread.h" | |
16 #include "chrome/browser/mock_keychain_mac.h" | 15 #include "chrome/browser/mock_keychain_mac.h" |
17 #include "chrome/browser/password_manager/password_store_consumer.h" | 16 #include "chrome/browser/password_manager/password_store_consumer.h" |
18 #include "chrome/browser/password_manager/password_store_mac.h" | 17 #include "chrome/browser/password_manager/password_store_mac.h" |
19 #include "chrome/browser/password_manager/password_store_mac_internal.h" | 18 #include "chrome/browser/password_manager/password_store_mac_internal.h" |
20 #include "chrome/common/chrome_paths.h" | 19 #include "chrome/common/chrome_paths.h" |
| 20 #include "content/browser/browser_thread.h" |
21 | 21 |
22 using webkit_glue::PasswordForm; | 22 using webkit_glue::PasswordForm; |
23 using testing::_; | 23 using testing::_; |
24 using testing::DoAll; | 24 using testing::DoAll; |
25 using testing::WithArg; | 25 using testing::WithArg; |
26 | 26 |
27 namespace { | 27 namespace { |
28 | 28 |
29 class MockPasswordStoreConsumer : public PasswordStoreConsumer { | 29 class MockPasswordStoreConsumer : public PasswordStoreConsumer { |
30 public: | 30 public: |
(...skipping 987 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1018 EXPECT_EQ(0U, matching_items.size()) << "iteration " << i; | 1018 EXPECT_EQ(0U, matching_items.size()) << "iteration " << i; |
1019 } | 1019 } |
1020 STLDeleteElements(&matching_items); | 1020 STLDeleteElements(&matching_items); |
1021 | 1021 |
1022 login_db_->GetLogins(*query_form, &matching_items); | 1022 login_db_->GetLogins(*query_form, &matching_items); |
1023 EXPECT_EQ(updates[i].password ? 1U : 0U, matching_items.size()) | 1023 EXPECT_EQ(updates[i].password ? 1U : 0U, matching_items.size()) |
1024 << "iteration " << i; | 1024 << "iteration " << i; |
1025 STLDeleteElements(&matching_items); | 1025 STLDeleteElements(&matching_items); |
1026 } | 1026 } |
1027 } | 1027 } |
OLD | NEW |