Commit 1cef2062 authored by Fabio Tirelo's avatar Fabio Tirelo Committed by Commit Bot

[Autofill Settings] Hide 'Add' button when Autofill toggle is disabled

Screenshots can be found in the bug.

Bug: 891369
Change-Id: I206d89a1118cad0f65c17ba3cafee81998e3198c
Reviewed-on: https://chromium-review.googlesource.com/1258046Reviewed-by: default avatarSebastien Seguin-Gagnon <sebsg@chromium.org>
Reviewed-by: default avatarHector Carmona <hcarmona@chromium.org>
Commit-Queue: Fabio Tirelo <ftirelo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#596272}
parent 40871382
......@@ -49,7 +49,7 @@
<paper-button id="addAddress"
class="secondary-button header-aligned-button"
on-click="onAddAddressTap_"
disabled$="[[!prefs.autofill.profile_enabled.value]]">
hidden$="[[!prefs.autofill.profile_enabled.value]]">
$i18n{add}
</paper-button>
</div>
......
......@@ -66,7 +66,7 @@
<paper-button id="addCreditCard"
class="secondary-button header-aligned-button"
on-click="onAddCreditCardTap_"
disabled$="[[!prefs.autofill.credit_card_enabled.value]]">
hidden$="[[!prefs.autofill.credit_card_enabled.value]]">
$i18n{add}
</paper-button>
</div>
......
......@@ -175,7 +175,7 @@ cr.define('settings_autofill_section', function() {
createAutofillSection([], {profile_enabled: {value: false}});
assertFalse(section.$$('#autofillProfileToggle').disabled);
assertTrue(section.$$('#addAddress').disabled);
assertTrue(section.$$('#addAddress').hidden);
});
test('verifyAddressFields', function() {
......
......@@ -81,7 +81,7 @@ cr.define('settings_payments_section', function() {
createPaymentsSection([], {credit_card_enabled: {value: false}});
assertFalse(section.$$('#autofillCreditCardToggle').disabled);
assertTrue(section.$$('#addCreditCard').disabled);
assertTrue(section.$$('#addCreditCard').hidden);
});
test('verifyCreditCardCount', function() {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment