Index: third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/fetch-response-xhr.https.html |
diff --git a/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/fetch-response-xhr.https.html b/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/fetch-response-xhr.https.html |
index 24eb44e222ece562c5e34fe238e4e71c10f10b0d..74173e8b9bdcc77c5f85832f85a5c44856b78565 100644 |
--- a/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/fetch-response-xhr.https.html |
+++ b/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/fetch-response-xhr.https.html |
@@ -3,7 +3,7 @@ |
<script src="/resources/testharness.js"></script> |
<script src="/resources/testharnessreport.js"></script> |
<script src="/common/get-host-info.sub.js"></script> |
-<script src="resources/test-helpers.sub.js?pipe=sub"></script> |
+<script src="resources/test-helpers.sub.js"></script> |
<script> |
async_test(function(t) { |
var SCOPE = 'resources/fetch-response-xhr-iframe.https.html'; |
@@ -13,7 +13,7 @@ async_test(function(t) { |
window.addEventListener('message', t.step_func(on_message), false); |
function on_message(e) { |
assert_equals(e.data.results, 'foo, bar'); |
- t.done(); |
+ e.source.postMessage('ACK', host_info['HTTPS_ORIGIN']); |
} |
service_worker_unregister_and_register(t, SCRIPT, SCOPE) |
@@ -22,13 +22,19 @@ async_test(function(t) { |
}) |
.then(function() { return with_iframe(SCOPE); }) |
.then(function(frame) { |
- var channel = new MessageChannel(); |
- channel.port1.onmessage = t.step_func(function(e) { |
- assert_equals(e.data.results, 'finish'); |
+ var channel; |
+ |
+ t.add_cleanup(function() { |
frame.remove(); |
service_worker_unregister_and_done(t, SCOPE); |
}); |
- frame.contentWindow.postMessage({}, |
+ |
+ channel = new MessageChannel(); |
+ channel.port1.onmessage = t.step_func(function(e) { |
+ assert_equals(e.data.results, 'finish'); |
+ t.done(); |
+ }); |
+ frame.contentWindow.postMessage('START', |
host_info['HTTPS_ORIGIN'], |
[channel.port2]); |
}) |