Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(268)

Unified Diff: third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/resources/fetch-response-xhr-iframe.https.html

Issue 2862353002: Upstream service worker `fetch` tests to WPT (Closed)
Patch Set: Rebase and resolve conflict in 'expectations' file Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/resources/fetch-response-xhr-iframe.https.html
diff --git a/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/resources/fetch-response-xhr-iframe.https.html b/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/resources/fetch-response-xhr-iframe.https.html
index 08b887b7de662e9c9b1b2542bbb359742c914212..1414596c16e324e9160643579945cb32166076be 100644
--- a/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/resources/fetch-response-xhr-iframe.https.html
+++ b/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/resources/fetch-response-xhr-iframe.https.html
@@ -23,11 +23,29 @@ function coalesce_headers_test() {
.then(function(xhr) {
window.parent.postMessage({results: xhr.getResponseHeader('foo')},
host_info['HTTPS_ORIGIN']);
+
+ return new Promise(function(resolve) {
+ window.addEventListener('message', function handle(evt) {
+ if (event.data !== 'ACK') {
+ return;
+ }
+
+ window.removeEventListener('message', handle);
+ resolve();
+ });
+ });
});
}
window.addEventListener('message', function(evt) {
- var port = evt.ports[0];
+ var port;
+
+ if (event.data !== 'START') {
+ return;
+ }
+
+ port = evt.ports[0];
+
coalesce_headers_test()
.then(function() { port.postMessage({results: 'finish'}); })
.catch(function(e) { port.postMessage({results: 'failure:' + e}); });

Powered by Google App Engine
This is Rietveld 408576698