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

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: Last final nit :-) 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 585 matching lines...) Expand 10 before | Expand all | Expand 10 after
596 596
597 // Setting empty data and unfocusing a required textfield will make it 597 // Setting empty data and unfocusing a required textfield will make it
598 // invalid. 598 // invalid.
599 SetEditorTextfieldValue(base::ASCIIToUTF16(""), 599 SetEditorTextfieldValue(base::ASCIIToUTF16(""),
600 autofill::CREDIT_CARD_NAME_FULL); 600 autofill::CREDIT_CARD_NAME_FULL);
601 601
602 ValidatingTextfield* textfield = 602 ValidatingTextfield* textfield =
603 static_cast<ValidatingTextfield*>(dialog_view()->GetViewByID( 603 static_cast<ValidatingTextfield*>(dialog_view()->GetViewByID(
604 static_cast<int>(autofill::CREDIT_CARD_NAME_FULL))); 604 static_cast<int>(autofill::CREDIT_CARD_NAME_FULL)));
605 EXPECT_TRUE(textfield); 605 EXPECT_TRUE(textfield);
606 EXPECT_TRUE(textfield->invalid()); 606 EXPECT_FALSE(textfield->IsValid());
607 } 607 }
608 608
609 } // namespace payments 609 } // namespace payments
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698