Title: [249983] trunk/LayoutTests/imported/w3c
- Revision
- 249983
- Author
- [email protected]
- Date
- 2019-09-17 14:43:13 -0700 (Tue, 17 Sep 2019)
Log Message
Unreviewed, revert r249850 as the flakiness should be gone as of the testharness.js update in r249977.
https://bugs.webkit.org/show_bug.cgi?id=201661
* web-platform-tests/service-workers/service-worker/getregistrations.https.html:
Modified Paths
Diff
Modified: trunk/LayoutTests/imported/w3c/ChangeLog (249982 => 249983)
--- trunk/LayoutTests/imported/w3c/ChangeLog 2019-09-17 21:36:10 UTC (rev 249982)
+++ trunk/LayoutTests/imported/w3c/ChangeLog 2019-09-17 21:43:13 UTC (rev 249983)
@@ -1,5 +1,12 @@
2019-09-17 Chris Dumez <[email protected]>
+ Unreviewed, revert r249850 as the flakiness should be gone as of the testharness.js update in r249977.
+ https://bugs.webkit.org/show_bug.cgi?id=201661
+
+ * web-platform-tests/service-workers/service-worker/getregistrations.https.html:
+
+2019-09-17 Chris Dumez <[email protected]>
+
Update testharness.js from upstream for web-platform-tests
https://bugs.webkit.org/show_bug.cgi?id=201843
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/service-workers/service-worker/getregistrations.https.html (249982 => 249983)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/service-workers/service-worker/getregistrations.https.html 2019-09-17 21:36:10 UTC (rev 249982)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/service-workers/service-worker/getregistrations.https.html 2019-09-17 21:43:13 UTC (rev 249983)
@@ -104,8 +104,20 @@
// test. So we have to wait until the cross origin register() is done, and not
// just until the frame loads.
const frame = await with_iframe_ready(frame_url);
- t.add_cleanup(() => frame.remove());
+ t.add_cleanup(async () => {
+ // Wait until the cross-origin worker is unregistered.
+ let resolve;
+ const channel = new MessageChannel();
+ channel.port1._onmessage_ = e => {
+ if (e.data == 'unregistered')
+ resolve();
+ };
+ frame.contentWindow.postMessage('unregister', '*', [channel.port2]);
+ await new Promise(r => { resolve = r; });
+ frame.remove();
+ });
+
const registrations = [
await service_worker_unregister_and_register(t, script, scope)];
t.add_cleanup(() => registrations[0].unregister());
@@ -113,15 +125,5 @@
assert_array_equals(
value, registrations,
'getRegistrations should only return same origin registrations.');
-
- // Wait until the cross-origin worker is unregistered.
- let resolve;
- const channel = new MessageChannel();
- channel.port1._onmessage_ = e => {
- if (e.data == 'unregistered')
- resolve();
- };
- frame.contentWindow.postMessage('unregister', '*', [channel.port2]);
- await new Promise(r => { resolve = r; });
}, 'getRegistrations promise resolves only with same origin registrations.');
</script>
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes