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. |