Chromium Code Reviews
DescriptionFix flaky TEST PaymentAppBrowserTest.PaymentAppInvocation.
The test PaymentAppBrowserTest.PaymentAppInvocation was flaky. I was able to
make it fails several times. On the other side, when --browser-side-navigation
is enabled, this test fails very often.
This is due to a race condition:
payment_app.js ¦ payment_app_window.html
-------------------------------¦----------------------------------------
client.openWindow ¦
| |_______________¦_______
| ¦ |
(promise onFullfiled called) ¦ |
| ¦ |
... ¦ |
| ¦ |
v ¦ |
AddEventListener(...) ¦ postMessage('payment_app_window_ready')
* postMessage('payment_app_window_ready') could be sended/received before
the event listener is registered on the service worker. In this case
the 'message' event was not handled. It causes the test to fails.
* A little bit surprising, it could also be send before the promise is
resolved. That's why I had to use the maybeSendPaymentRequest().
BUG=703602
Review-Url: https://codereview.chromium.org/2785093003
Cr-Commit-Position: refs/heads/master@{#461074}
Committed: https://chromium.googlesource.com/chromium/src/+/007c7242b1ac8aad353e2eac5279071ac59936c0
Patch Set 1 #
Total comments: 1
Messages
Total messages: 14 (9 generated)
|
|||||||||||||||||||