Re: [ServiceWorker] Promise on navigator.serviceWorker that resolves when page is controlled (#799)

@delapuente: The test I'm referring to that was flaky when waiting on `.ready`: https://github.com/PolymerElements/platinum-sw/blob/4cfa76aae4aa9926ace3041fecfafb25c4da2265/test/platinum-sw-fetch/index.html#L37

It's no longer flaky since switching over to explicitly wait on the page being controlled: https://github.com/PolymerElements/platinum-sw/blob/fb5a32dd77a7ee9e4240a05e0d00a570b176fb25/test/platinum-sw-fetch/index.html#L38

It's testing behavior that relies on the service worker's `fetch` handler being triggered, and that will only happen if the page is controlled when it makes the network request. To reiterate my confusion, I thought that `.ready`'s resolution implied that the page was controlled, but it doesn't actually imply that.

---
Reply to this email directly or view it on GitHub:
https://github.com/slightlyoff/ServiceWorker/issues/799#issuecomment-165533984

Received on Thursday, 17 December 2015 18:06:29 UTC