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

Side by Side Diff: chrome/browser/ui/autofill/autofill_dialog_controller_browsertest.cc

Issue 22623002: Extract AutofillDialogController interface and common utilities. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 4 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 #include "base/bind.h" 5 #include "base/bind.h"
6 #include "base/command_line.h" 6 #include "base/command_line.h"
7 #include "base/memory/ref_counted.h" 7 #include "base/memory/ref_counted.h"
8 #include "base/memory/weak_ptr.h" 8 #include "base/memory/weak_ptr.h"
9 #include "base/message_loop/message_loop.h" 9 #include "base/message_loop/message_loop.h"
10 #include "base/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 virtual ValidityData InputsAreValid( 133 virtual ValidityData InputsAreValid(
134 DialogSection section, 134 DialogSection section,
135 const DetailOutputMap& inputs, 135 const DetailOutputMap& inputs,
136 ValidationType validation_type) OVERRIDE { 136 ValidationType validation_type) OVERRIDE {
137 if (!use_validation_) 137 if (!use_validation_)
138 return ValidityData(); 138 return ValidityData();
139 return AutofillDialogControllerImpl::InputsAreValid( 139 return AutofillDialogControllerImpl::InputsAreValid(
140 section, inputs, validation_type); 140 section, inputs, validation_type);
141 } 141 }
142 142
143 // Saving to Chrome is tested in AutofillDialogController unit tests. 143 // Saving to Chrome is tested in AutofillDialogControllerImpl unit tests.
144 // TODO(estade): test that the view defaults to saving to Chrome. 144 // TODO(estade): test that the view defaults to saving to Chrome.
145 virtual bool ShouldOfferToSaveInChrome() const OVERRIDE { 145 virtual bool ShouldOfferToSaveInChrome() const OVERRIDE {
146 return false; 146 return false;
147 } 147 }
148 148
149 // Increase visibility for testing. 149 // Increase visibility for testing.
150 using AutofillDialogControllerImpl::view; 150 using AutofillDialogControllerImpl::view;
151 using AutofillDialogControllerImpl::input_showing_popup; 151 using AutofillDialogControllerImpl::input_showing_popup;
152 152
153 virtual std::vector<DialogNotification> CurrentNotifications() OVERRIDE { 153 virtual std::vector<DialogNotification> CurrentNotifications() OVERRIDE {
(...skipping 714 matching lines...) Expand 10 before | Expand all | Expand 10 after
868 EXPECT_EQ(cc_number.type, new_cc_number.type); 868 EXPECT_EQ(cc_number.type, new_cc_number.type);
869 EXPECT_EQ(ASCIIToUTF16("4111111111111111"), 869 EXPECT_EQ(ASCIIToUTF16("4111111111111111"),
870 view->GetTextContentsOfInput(new_cc_number)); 870 view->GetTextContentsOfInput(new_cc_number));
871 871
872 EXPECT_NE(ASCIIToUTF16("shipping name"), 872 EXPECT_NE(ASCIIToUTF16("shipping name"),
873 view->GetTextContentsOfInput(shipping_zip)); 873 view->GetTextContentsOfInput(shipping_zip));
874 } 874 }
875 #endif // defined(TOOLKIT_VIEWS) || defined(OS_MACOSX) 875 #endif // defined(TOOLKIT_VIEWS) || defined(OS_MACOSX)
876 876
877 } // namespace autofill 877 } // namespace autofill
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698