diff options
author | tkent@chromium.org <tkent@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-04-21 03:39:26 +0000 |
---|---|---|
committer | tkent@chromium.org <tkent@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-04-21 03:39:26 +0000 |
commit | d614b52587757b4808a67a55cf2eceb8b42cf7f2 (patch) | |
tree | 136ffb00b09bfe38f5a03d61087628940e66bc8c /net/quic/quic_data_writer_test.cc | |
parent | a04558be6256ba846cf43784e46adbfe2d6cc660 (diff) | |
download | chromium_src-d614b52587757b4808a67a55cf2eceb8b42cf7f2.zip chromium_src-d614b52587757b4808a67a55cf2eceb8b42cf7f2.tar.gz chromium_src-d614b52587757b4808a67a55cf2eceb8b42cf7f2.tar.bz2 |
Fix a bug that phone number field is not saved occasionally.
An editing phone number value is not applied correctly because a reply for a
chrome.send() has some delay.
Bug scenario:
1. Click handler for autofill-edit-address-apply-button is kicked.
2. document.activeElement.blur() is called.
- An INPUT element in phone-list loses focus.
- AutofillPhoneValuesList.validateAndSave is called.
- It calls chrome.send('validatePhoneNumbers')
3. 0ms delay by setTimeout in the click handler
4. self.saveAddress_() is called, and the overlay is dismissed.
5. AutofillEditAddressOverlay.setValidatedPhoneNumbers is called. It's too late.
To fix this issue, we wait for completing phone number validation.
- AutofillPhoneValuesList provide a Promise which is fulfilled when all
of validation requests are completed.
- The autofill-edit-address-apply-button handler wait until the
Promise is fulfilled.
This process worked well accidentally before r254991 because we incorrectly did
blur in the mousedown handler of autofill-edit-address-apply-button, and
setValidatedPhoneNumbers was called before mouseup.
BUG=361950
Review URL: https://codereview.chromium.org/236003008
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@264965 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/quic/quic_data_writer_test.cc')
0 files changed, 0 insertions, 0 deletions