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

Unified 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: dont play with fire Created 6 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/autofill/autofill_dialog_view_tester.h
diff --git a/chrome/browser/ui/autofill/testable_autofill_dialog_view.h b/chrome/browser/ui/autofill/autofill_dialog_view_tester.h
similarity index 64%
rename from chrome/browser/ui/autofill/testable_autofill_dialog_view.h
rename to chrome/browser/ui/autofill/autofill_dialog_view_tester.h
index 13a23db31fc387eb0b510ac9ddb28e0b89c37c23..3f4ed7f52b9290da8acf60da04a039f1cc4fb2f6 100644
--- a/chrome/browser/ui/autofill/testable_autofill_dialog_view.h
+++ b/chrome/browser/ui/autofill/autofill_dialog_view_tester.h
@@ -2,16 +2,30 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CHROME_BROWSER_UI_AUTOFILL_TESTABLE_AUTOFILL_DIALOG_VIEW_H_
-#define CHROME_BROWSER_UI_AUTOFILL_TESTABLE_AUTOFILL_DIALOG_VIEW_H_
+#ifndef CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_DIALOG_VIEW_TESTER_H_
+#define CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_DIALOG_VIEW_TESTER_H_
+
+#include "base/memory/scoped_ptr.h"
+#include "base/strings/string16.h"
+#include "chrome/browser/ui/autofill/autofill_dialog_types.h"
+#include "components/autofill/core/browser/field_types.h"
+#include "ui/gfx/size.h"
+
+namespace content {
+class WebContents;
+}
namespace autofill {
-// Functions that an AutofillDialogView implementation should implement in order
-// to assist in unit testing.
-class TestableAutofillDialogView {
+class AutofillDialogView;
+
+// Functionality that helps to test an AutofillDialogView.
+class AutofillDialogViewTester {
public:
- virtual ~TestableAutofillDialogView() {}
+ // Gets a AutofillDialogViewTester for |view|.
+ static scoped_ptr<AutofillDialogViewTester> Wrap(AutofillDialogView* view);
Dan Beam 2014/01/24 23:37:40 nit: s/Wrap/For/ like WebContentsTester [1] [1] h
Dan Beam 2014/01/24 23:37:40 what's the advantage to changing the ownership mod
Evan Stade 2014/01/27 21:08:35 Done.
Evan Stade 2014/01/27 21:08:35 AutofillDialogView is still a weak pointer. Testab
+
+ virtual ~AutofillDialogViewTester() {}
// Simulates the user pressing 'Submit' to accept the dialog.
virtual void SubmitForTesting() = 0;
@@ -45,4 +59,4 @@ class TestableAutofillDialogView {
} // namespace autofill
-#endif // CHROME_BROWSER_UI_AUTOFILL_TESTABLE_AUTOFILL_DIALOG_VIEW_H_
+#endif // CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_DIALOG_VIEW_TESTER_H_

Powered by Google App Engine
This is Rietveld 408576698