Chromium Code Reviews| Index: chrome/browser/ui/passwords/test_manage_passwords_bubble_ui_controller.h |
| diff --git a/chrome/browser/ui/passwords/test_manage_passwords_bubble_ui_controller.h b/chrome/browser/ui/passwords/test_manage_passwords_bubble_ui_controller.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..91b0e37271d9273323cea769743e4c3e86b79a29 |
| --- /dev/null |
| +++ b/chrome/browser/ui/passwords/test_manage_passwords_bubble_ui_controller.h |
| @@ -0,0 +1,50 @@ |
| +// Copyright 2014 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef CHROME_BROWSER_UI_PASSWORDS_TEST_MANAGE_PASSWORDS_BUBBLE_UI_CONTROLLER_H_ |
| +#define CHROME_BROWSER_UI_PASSWORDS_TEST_MANAGE_PASSWORDS_BUBBLE_UI_CONTROLLER_H_ |
| + |
| +#include "base/basictypes.h" |
| +#include "chrome/browser/ui/passwords/manage_passwords_bubble_ui_controller.h" |
| + |
| +namespace content { |
| +class WebContents; |
| +} // namespace content |
| + |
| +class TestManagePasswordsBubbleUIController |
|
markusheintz_
2014/04/22 11:00:54
nit: I know we use TestABC in other places but I t
Mike West
2014/04/22 11:57:39
Done.
|
| + : public ManagePasswordsBubbleUIController { |
|
markusheintz_
2014/04/22 11:00:54
I wonder whether there should be a common interfac
Mike West
2014/04/22 11:57:39
Extending the class means that I'm actually testin
|
| + public: |
| + explicit TestManagePasswordsBubbleUIController( |
| + content::WebContents* contents); |
| + virtual ~TestManagePasswordsBubbleUIController(); |
| + |
| + // Don't _actually_ navigate in a test. That would be silly. |
|
markusheintz_
2014/04/22 11:00:54
Why would it be silly. Please explain this in the
Mike West
2014/04/22 11:57:39
Done.
|
| + virtual void NavigateToPasswordManagerSettingsPage() OVERRIDE; |
| + bool navigated_to_settings_page() const { |
| + return navigated_to_settings_page_; |
| + } |
| + |
| + // We don't have a FormManager in tests, so stub these out. |
| + virtual void SavePassword() OVERRIDE; |
| + bool saved_password() const { return saved_password_; } |
| + |
| + virtual void NeverSavePassword() OVERRIDE; |
| + bool never_saved_password() const { return never_saved_password_; } |
| + |
| + virtual const autofill::PasswordForm& PendingCredentials() const OVERRIDE; |
| + |
| + // True if this controller is installed on |web_contents()|. |
| + bool IsInstalled() const; |
| + |
| + private: |
| + bool navigated_to_settings_page_; |
| + bool saved_password_; |
| + bool never_saved_password_; |
| + |
| + autofill::PasswordForm pending_credentials_; |
| + |
| + DISALLOW_COPY_AND_ASSIGN(TestManagePasswordsBubbleUIController); |
| +}; |
| + |
| +#endif // CHROME_BROWSER_UI_PASSWORDS_TEST_MANAGE_PASSWORDS_BUBBLE_UI_CONTROLLER_H_ |