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 <vector> | 5 #include <vector> |
6 | 6 |
7 #include "base/message_loop/message_loop.h" | 7 #include "base/message_loop/message_loop.h" |
8 #include "base/strings/string_util.h" | 8 #include "base/strings/string_util.h" |
9 #include "base/strings/utf_string_conversions.h" | 9 #include "base/strings/utf_string_conversions.h" |
10 #include "chrome/browser/password_manager/password_manager.h" | 10 #include "chrome/browser/password_manager/password_manager.h" |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
59 class MockPasswordManagerDriver : public PasswordManagerDriver { | 59 class MockPasswordManagerDriver : public PasswordManagerDriver { |
60 public: | 60 public: |
61 MOCK_METHOD1(FillPasswordForm, void(const autofill::PasswordFormFillData&)); | 61 MOCK_METHOD1(FillPasswordForm, void(const autofill::PasswordFormFillData&)); |
62 MOCK_METHOD0(DidLastPageLoadEncounterSSLErrors, bool()); | 62 MOCK_METHOD0(DidLastPageLoadEncounterSSLErrors, bool()); |
63 MOCK_METHOD0(IsOffTheRecord, bool()); | 63 MOCK_METHOD0(IsOffTheRecord, bool()); |
64 MOCK_METHOD0(GetPasswordGenerationManager, PasswordGenerationManager*()); | 64 MOCK_METHOD0(GetPasswordGenerationManager, PasswordGenerationManager*()); |
65 MOCK_METHOD0(GetPasswordManager, PasswordManager*()); | 65 MOCK_METHOD0(GetPasswordManager, PasswordManager*()); |
66 MOCK_METHOD0(GetAutofillManager, autofill::AutofillManager*()); | 66 MOCK_METHOD0(GetAutofillManager, autofill::AutofillManager*()); |
67 MOCK_METHOD1(AllowPasswordGenerationForForm, | 67 MOCK_METHOD1(AllowPasswordGenerationForForm, |
68 void(autofill::PasswordForm* form)); | 68 void(autofill::PasswordForm* form)); |
| 69 MOCK_METHOD1(AccountCreationFormsFound, |
| 70 void(const std::vector<autofill::FormData>&)); |
69 }; | 71 }; |
70 | 72 |
71 ACTION_P(InvokeConsumer, forms) { | 73 ACTION_P(InvokeConsumer, forms) { |
72 arg0->OnGetPasswordStoreResults(forms); | 74 arg0->OnGetPasswordStoreResults(forms); |
73 } | 75 } |
74 | 76 |
75 ACTION_P(SaveToScopedPtr, scoped) { | 77 ACTION_P(SaveToScopedPtr, scoped) { |
76 scoped->reset(arg0); | 78 scoped->reset(arg0); |
77 } | 79 } |
78 | 80 |
(...skipping 534 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
613 manager()->ProvisionallySavePassword(login_form); | 615 manager()->ProvisionallySavePassword(login_form); |
614 | 616 |
615 PasswordForm failed_login_form(MakeTwitterFailedLoginForm()); | 617 PasswordForm failed_login_form(MakeTwitterFailedLoginForm()); |
616 observed.clear(); | 618 observed.clear(); |
617 observed.push_back(failed_login_form); | 619 observed.push_back(failed_login_form); |
618 // A PasswordForm appears, and is visible in the layout: | 620 // A PasswordForm appears, and is visible in the layout: |
619 // No expected calls to the PasswordStore... | 621 // No expected calls to the PasswordStore... |
620 manager()->OnPasswordFormsParsed(observed); | 622 manager()->OnPasswordFormsParsed(observed); |
621 manager()->OnPasswordFormsRendered(observed); | 623 manager()->OnPasswordFormsRendered(observed); |
622 } | 624 } |
OLD | NEW |