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

Side by Side Diff: chrome/browser/ui/views/payments/credit_card_editor_view_controller_browsertest.cc

Issue 2881643002: Focus first invalid field of payment request editor (Closed)
Patch Set: Fixed a case typo Created 3 years, 7 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
OLDNEW
1 // Copyright 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 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 <string> 5 #include <string>
6 #include <vector> 6 #include <vector>
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "base/strings/utf_string_conversions.h" 9 #include "base/strings/utf_string_conversions.h"
10 #include "base/time/time.h" 10 #include "base/time/time.h"
(...skipping 581 matching lines...) Expand 10 before | Expand all | Expand 10 after
592 592
593 // Setting empty data and unfocusing a required textfield will make it 593 // Setting empty data and unfocusing a required textfield will make it
594 // invalid. 594 // invalid.
595 SetEditorTextfieldValue(base::ASCIIToUTF16(""), 595 SetEditorTextfieldValue(base::ASCIIToUTF16(""),
596 autofill::CREDIT_CARD_NAME_FULL); 596 autofill::CREDIT_CARD_NAME_FULL);
597 597
598 ValidatingTextfield* textfield = 598 ValidatingTextfield* textfield =
599 static_cast<ValidatingTextfield*>(dialog_view()->GetViewByID( 599 static_cast<ValidatingTextfield*>(dialog_view()->GetViewByID(
600 static_cast<int>(autofill::CREDIT_CARD_NAME_FULL))); 600 static_cast<int>(autofill::CREDIT_CARD_NAME_FULL)));
601 EXPECT_TRUE(textfield); 601 EXPECT_TRUE(textfield);
602 EXPECT_TRUE(textfield->invalid()); 602 EXPECT_FALSE(textfield->IsValid());
603 } 603 }
604 604
605 } // namespace payments 605 } // namespace payments
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698