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

Unified Diff: chrome/test/data/webui/settings/settings_autofill_section_browsertest.js

Issue 2082863002: [MD Settings] Allow saving addresses in material design settings. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@address-edit-dialog.gitbr
Patch Set: rebase Created 4 years, 6 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
Index: chrome/test/data/webui/settings/settings_autofill_section_browsertest.js
diff --git a/chrome/test/data/webui/settings/settings_autofill_section_browsertest.js b/chrome/test/data/webui/settings/settings_autofill_section_browsertest.js
index de3c0e8cb2e196f335900c1b987120897b95ef08..b1e0172e5d3289a83e329c72b8e16c71a84c58f5 100644
--- a/chrome/test/data/webui/settings/settings_autofill_section_browsertest.js
+++ b/chrome/test/data/webui/settings/settings_autofill_section_browsertest.js
@@ -416,6 +416,31 @@ TEST_F('SettingsAutofillSectionBrowserTest', 'uiTests', function() {
});
});
+ test('verifyPhoneAndEmailAreRemoved', function(done) {
michaelpg 2016/06/29 00:00:28 optional: use promises instead of done
hcarmona 2016/07/11 22:35:45 Done.
+ var address = FakeDataMaker.emptyAddressEntry();
+
+ var phoneNumber = '(555) 555-5555';
+ var emailAddress = 'no-reply@chromium.org';
+
+ address.phoneNumbers = [phoneNumber];
+ address.emailAddresses = [emailAddress];
+
+ self.createAddressDialog_(address).then(function(dialog) {
michaelpg 2016/06/29 00:00:28 return ...
hcarmona 2016/07/11 22:35:45 Done.
+ assertEquals(phoneNumber, dialog.$.phoneInput.value);
+ assertEquals(emailAddress, dialog.$.emailInput.value);
+
+ dialog.$.phoneInput.value = '';
+ dialog.$.emailInput.value = '';
+
+ Polymer.dom.flush();
+
+ assertEquals(0, address.phoneNumbers.length);
+ assertEquals(0, address.emailAddresses.length);
+
+ done();
+ });
+ });
+
// Test will set a value of 'foo' in each text field and verify that the
// save button is enabled, then it will clear the field and verify that the
// save button is disabled. Test passes after all elements have been tested.

Powered by Google App Engine
This is Rietveld 408576698