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

Unified Diff: chrome/browser/ui/autofill/autofill_dialog_controller_browsertest.cc

Issue 650293002: Add test for requestAutocomplete and readonly attribute. (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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/ui/autofill/autofill_dialog_controller_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/autofill/autofill_dialog_controller_browsertest.cc
diff --git a/chrome/browser/ui/autofill/autofill_dialog_controller_browsertest.cc b/chrome/browser/ui/autofill/autofill_dialog_controller_browsertest.cc
index f2c90cf6aec0fecd151b62e931673017d37270dc..464eaf4e028bf6a25517e8b8a845095e7a5d383d 100644
--- a/chrome/browser/ui/autofill/autofill_dialog_controller_browsertest.cc
+++ b/chrome/browser/ui/autofill/autofill_dialog_controller_browsertest.cc
@@ -1772,4 +1772,19 @@ IN_PROC_BROWSER_TEST_F(AutofillDialogControllerTest,
EXPECT_EQ(ASCIIToUTF16("USD"), controller->transaction_currency_);
}
+// Same as above, plus readonly attribute.
+IN_PROC_BROWSER_TEST_F(AutofillDialogControllerTest,
+ TransactionAmountReadonly) {
+ std::string html(
+ "<input type='number' step='0.01'"
+ " autocomplete='transaction-amount' value='24' readonly>"
+ "<input autocomplete='transaction-currency' value='USD' readonly>"
+ "<input autocomplete='cc-csc'>");
+ AutofillDialogControllerImpl* controller = SetUpHtmlAndInvoke(html);
+ ASSERT_TRUE(controller);
+
+ EXPECT_EQ(ASCIIToUTF16("24"), controller->transaction_amount_);
+ EXPECT_EQ(ASCIIToUTF16("USD"), controller->transaction_currency_);
+}
+
} // namespace autofill
« no previous file with comments | « no previous file | chrome/browser/ui/autofill/autofill_dialog_controller_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698