Chromium Code Reviews
DescriptionFix flaky SW registration in PushMessaging/BudgetManager browser tests
There was a race condition between registering the Service Workers (and
having them install and activate) and reloading the page. Many tests
were assuming that reloading the page would be sufficient to ensure
the page was controlled by the Service Worker. This patch makes that
reliable, by waiting until the SW is ready.
It should fix the error mentioned in https://crbug.com/657202:
Actual: "false - is not controlled"
Expected: "true - is controlled"
which affected:
- BudgetManagerBrowserTest.BudgetInWorker
- PushMessagingBrowserTest.SubscribeWorker
- PushMessagingBrowserTest.SubscribeWorkerUsingManifest
Hopefully it'll also fix https://crbug.com/554003 which affected:
- PushMessagingBrowserTest.SubscribePersiste
since the errors there were unclear but that test exercises SW
registration heavily, so it might well have suffered from the same
problem. If that test (alone) turns out to still be flaky, please just
mark it flaky again rather than reverting this patch.
BUG=657202, 554003
Committed: https://crrev.com/8062ec7de6c712190aad47f398f853afbfb19e5d
Cr-Commit-Position: refs/heads/master@{#428996}
Patch Set 1 #
Total comments: 2
Patch Set 2 : Rebase #
Messages
Total messages: 14 (8 generated)
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||