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

Side by Side Diff: chrome/renderer/autofill/form_autofill_browsertest.cc

Issue 648243003: Revert of [Autofill Clean up] Revert changes introduced by Autocheckout to autofill (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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
« no previous file with comments | « no previous file | components/autofill/content/renderer/form_autofill_util.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 <vector> 5 #include <vector>
6 6
7 #include "base/format_macros.h" 7 #include "base/format_macros.h"
8 #include "base/metrics/field_trial.h" 8 #include "base/metrics/field_trial.h"
9 #include "base/strings/string16.h" 9 #include "base/strings/string16.h"
10 #include "base/strings/string_util.h" 10 #include "base/strings/string_util.h"
(...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after
251 251
252 const WebString expected_value = ASCIIToUTF16(field_case.expected_value); 252 const WebString expected_value = ASCIIToUTF16(field_case.expected_value);
253 if (expected_value.isEmpty()) 253 if (expected_value.isEmpty())
254 EXPECT_TRUE(value.isEmpty()); 254 EXPECT_TRUE(value.isEmpty());
255 else 255 else
256 EXPECT_EQ(expected_value, value); 256 EXPECT_EQ(expected_value, value);
257 257
258 EXPECT_EQ(field_case.should_be_autofilled, element.isAutofilled()); 258 EXPECT_EQ(field_case.should_be_autofilled, element.isAutofilled());
259 } 259 }
260 260
261 static void FillFormForAllFieldsWrapper(const FormData& form,
262 const WebInputElement& element) {
263 FillFormForAllElements(form, element.form());
264 }
265
261 static void FillFormIncludingNonFocusableElementsWrapper( 266 static void FillFormIncludingNonFocusableElementsWrapper(
262 const FormData& form, 267 const FormData& form,
263 const WebFormControlElement& element) { 268 const WebFormControlElement& element) {
264 FillFormIncludingNonFocusableElements(form, element.form()); 269 FillFormIncludingNonFocusableElements(form, element.form());
265 } 270 }
266 271
267 static WebString GetValueWrapper(WebFormControlElement element) { 272 static WebString GetValueWrapper(WebFormControlElement element) {
268 if (element.formControlType() == "textarea") 273 if (element.formControlType() == "textarea")
269 return element.to<WebTextAreaElement>().value(); 274 return element.to<WebTextAreaElement>().value();
270 275
(...skipping 3405 matching lines...) Expand 10 before | Expand all | Expand 10 after
3676 expected.max_length = WebInputElement::defaultMaxLength(); 3681 expected.max_length = WebInputElement::defaultMaxLength();
3677 EXPECT_FORM_FIELD_DATA_EQUALS(expected, fields[1]); 3682 EXPECT_FORM_FIELD_DATA_EQUALS(expected, fields[1]);
3678 3683
3679 expected.name = ASCIIToUTF16("country"); 3684 expected.name = ASCIIToUTF16("country");
3680 expected.value = ASCIIToUTF16("AL"); 3685 expected.value = ASCIIToUTF16("AL");
3681 expected.form_control_type = "select-one"; 3686 expected.form_control_type = "select-one";
3682 expected.max_length = 0; 3687 expected.max_length = 0;
3683 EXPECT_FORM_FIELD_DATA_EQUALS(expected, fields[2]); 3688 EXPECT_FORM_FIELD_DATA_EQUALS(expected, fields[2]);
3684 } 3689 }
3685 } // namespace autofill 3690 } // namespace autofill
OLDNEW
« no previous file with comments | « no previous file | components/autofill/content/renderer/form_autofill_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698