Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(40)

Side by Side Diff: chrome/browser/ui/autofill/autofill_dialog_view_tester.h

Issue 135933003: rAc: split TestableAutofillDialogView implementation into its own class (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: with mac nits fixed Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 #ifndef CHROME_BROWSER_UI_AUTOFILL_TESTABLE_AUTOFILL_DIALOG_VIEW_H_ 5 #ifndef CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_DIALOG_VIEW_TESTER_H_
6 #define CHROME_BROWSER_UI_AUTOFILL_TESTABLE_AUTOFILL_DIALOG_VIEW_H_ 6 #define CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_DIALOG_VIEW_TESTER_H_
7
8 #include "base/memory/scoped_ptr.h"
9 #include "base/strings/string16.h"
10 #include "chrome/browser/ui/autofill/autofill_dialog_types.h"
11 #include "components/autofill/core/browser/field_types.h"
12 #include "ui/gfx/size.h"
13
14 namespace content {
15 class WebContents;
16 }
7 17
8 namespace autofill { 18 namespace autofill {
9 19
10 // Functions that an AutofillDialogView implementation should implement in order 20 class AutofillDialogView;
11 // to assist in unit testing. 21
12 class TestableAutofillDialogView { 22 // Functionality that helps to test an AutofillDialogView.
23 class AutofillDialogViewTester {
13 public: 24 public:
14 virtual ~TestableAutofillDialogView() {} 25 // Gets a AutofillDialogViewTester for |view|.
26 static scoped_ptr<AutofillDialogViewTester> For(AutofillDialogView* view);
27
28 virtual ~AutofillDialogViewTester() {}
15 29
16 // Simulates the user pressing 'Submit' to accept the dialog. 30 // Simulates the user pressing 'Submit' to accept the dialog.
17 virtual void SubmitForTesting() = 0; 31 virtual void SubmitForTesting() = 0;
18 32
19 // Simulates the user pressing 'Cancel' to abort the dialog. 33 // Simulates the user pressing 'Cancel' to abort the dialog.
20 virtual void CancelForTesting() = 0; 34 virtual void CancelForTesting() = 0;
21 35
22 // Returns the actual contents of the input of |type|. 36 // Returns the actual contents of the input of |type|.
23 virtual base::string16 GetTextContentsOfInput(ServerFieldType type) = 0; 37 virtual base::string16 GetTextContentsOfInput(ServerFieldType type) = 0;
24 38
(...skipping 13 matching lines...) Expand all
38 52
39 // Get the web contents used to sign in to Google. 53 // Get the web contents used to sign in to Google.
40 virtual content::WebContents* GetSignInWebContents() = 0; 54 virtual content::WebContents* GetSignInWebContents() = 0;
41 55
42 // Whether the overlay is visible. 56 // Whether the overlay is visible.
43 virtual bool IsShowingOverlay() const = 0; 57 virtual bool IsShowingOverlay() const = 0;
44 }; 58 };
45 59
46 } // namespace autofill 60 } // namespace autofill
47 61
48 #endif // CHROME_BROWSER_UI_AUTOFILL_TESTABLE_AUTOFILL_DIALOG_VIEW_H_ 62 #endif // CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_DIALOG_VIEW_TESTER_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/autofill/autofill_dialog_view.cc ('k') | chrome/browser/ui/autofill/testable_autofill_dialog_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698