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