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 "base/basictypes.h" | 5 #include "base/basictypes.h" |
6 #include "base/bind.h" | 6 #include "base/bind.h" |
7 #include "base/bind_helpers.h" | 7 #include "base/bind_helpers.h" |
8 #include "base/file_util.h" | 8 #include "base/file_util.h" |
9 #include "base/files/scoped_temp_dir.h" | 9 #include "base/files/scoped_temp_dir.h" |
10 #include "base/platform_file.h" | 10 #include "base/platform_file.h" |
(...skipping 14 matching lines...) Expand all Loading... |
25 #include "chrome/test/base/testing_profile.h" | 25 #include "chrome/test/base/testing_profile.h" |
26 #include "content/public/browser/browser_thread.h" | 26 #include "content/public/browser/browser_thread.h" |
27 #include "content/public/browser/notification_details.h" | 27 #include "content/public/browser/notification_details.h" |
28 #include "content/public/browser/notification_registrar.h" | 28 #include "content/public/browser/notification_registrar.h" |
29 #include "content/public/browser/notification_source.h" | 29 #include "content/public/browser/notification_source.h" |
30 #include "content/public/test/mock_notification_observer.h" | 30 #include "content/public/test/mock_notification_observer.h" |
31 #include "content/public/test/test_browser_thread_bundle.h" | 31 #include "content/public/test/test_browser_thread_bundle.h" |
32 #include "testing/gmock/include/gmock/gmock.h" | 32 #include "testing/gmock/include/gmock/gmock.h" |
33 #include "testing/gtest/include/gtest/gtest.h" | 33 #include "testing/gtest/include/gtest/gtest.h" |
34 | 34 |
| 35 using autofill::PasswordForm; |
35 using content::BrowserThread; | 36 using content::BrowserThread; |
36 using testing::_; | 37 using testing::_; |
37 using testing::DoAll; | 38 using testing::DoAll; |
38 using testing::ElementsAreArray; | 39 using testing::ElementsAreArray; |
39 using testing::Pointee; | 40 using testing::Pointee; |
40 using testing::Property; | 41 using testing::Property; |
41 using testing::WithArg; | 42 using testing::WithArg; |
42 using content::PasswordForm; | |
43 | 43 |
44 typedef std::vector<PasswordForm*> VectorOfForms; | 44 typedef std::vector<PasswordForm*> VectorOfForms; |
45 | 45 |
46 namespace { | 46 namespace { |
47 | 47 |
48 class MockPasswordStoreConsumer : public PasswordStoreConsumer { | 48 class MockPasswordStoreConsumer : public PasswordStoreConsumer { |
49 public: | 49 public: |
50 MOCK_METHOD2(OnPasswordStoreRequestDone, | 50 MOCK_METHOD2(OnPasswordStoreRequestDone, |
51 void(CancelableRequestProvider::Handle, | 51 void(CancelableRequestProvider::Handle, |
52 const std::vector<PasswordForm*>&)); | 52 const std::vector<PasswordForm*>&)); |
(...skipping 428 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
481 | 481 |
482 INSTANTIATE_TEST_CASE_P(NoBackend, | 482 INSTANTIATE_TEST_CASE_P(NoBackend, |
483 PasswordStoreXTest, | 483 PasswordStoreXTest, |
484 testing::Values(NO_BACKEND)); | 484 testing::Values(NO_BACKEND)); |
485 INSTANTIATE_TEST_CASE_P(FailingBackend, | 485 INSTANTIATE_TEST_CASE_P(FailingBackend, |
486 PasswordStoreXTest, | 486 PasswordStoreXTest, |
487 testing::Values(FAILING_BACKEND)); | 487 testing::Values(FAILING_BACKEND)); |
488 INSTANTIATE_TEST_CASE_P(WorkingBackend, | 488 INSTANTIATE_TEST_CASE_P(WorkingBackend, |
489 PasswordStoreXTest, | 489 PasswordStoreXTest, |
490 testing::Values(WORKING_BACKEND)); | 490 testing::Values(WORKING_BACKEND)); |
OLD | NEW |