| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 /** | 5 /** |
| 6 * TestFixture for autofill options WebUI testing. | 6 * TestFixture for autofill options WebUI testing. |
| 7 * @extends {testing.Test} | 7 * @extends {testing.Test} |
| 8 * @constructor | 8 * @constructor |
| 9 */ | 9 */ |
| 10 function AutofillOptionsWebUITest() {} | 10 function AutofillOptionsWebUITest() {} |
| (...skipping 29 matching lines...) Expand all Loading... |
| 40 | 40 |
| 41 /** @override */ | 41 /** @override */ |
| 42 isAsync: true, | 42 isAsync: true, |
| 43 }; | 43 }; |
| 44 | 44 |
| 45 TEST_F('AutofillEditAddressWebUITest', | 45 TEST_F('AutofillEditAddressWebUITest', |
| 46 'testAutofillPhoneValueListDoneValidating', | 46 'testAutofillPhoneValueListDoneValidating', |
| 47 function() { | 47 function() { |
| 48 assertEquals(this.browsePreload, document.location.href); | 48 assertEquals(this.browsePreload, document.location.href); |
| 49 | 49 |
| 50 var phoneList = $('phone-list'); | 50 var phoneList = |
| 51 document.querySelector('#autofill-edit-address-overlay [field=phone]'); |
| 51 expectEquals(0, phoneList.validationRequests_); | 52 expectEquals(0, phoneList.validationRequests_); |
| 52 phoneList.doneValidating().then(function() { | 53 phoneList.doneValidating().then(function() { |
| 53 phoneList.focus(); | 54 phoneList.focus(); |
| 54 var input = phoneList.querySelector('input'); | 55 var input = phoneList.querySelector('input'); |
| 55 input.focus(); | 56 input.focus(); |
| 56 document.execCommand('insertText', false, '111-222-333'); | 57 document.execCommand('insertText', false, '111-222-333'); |
| 57 assertEquals('111-222-333', input.value); | 58 assertEquals('111-222-333', input.value); |
| 58 input.blur(); | 59 input.blur(); |
| 59 phoneList.doneValidating().then(function() { | 60 phoneList.doneValidating().then(function() { |
| 60 testDone(); | 61 testDone(); |
| 61 }); | 62 }); |
| 62 }); | 63 }); |
| 63 }); | 64 }); |
| OLD | NEW |