mirror of
https://github.com/servo/servo.git
synced 2025-09-11 07:28:19 +01:00
Update web-platform-tests to revision a589fd30bc64bb4d40e1d6854e07accca69b8472
This commit is contained in:
parent
81ab255b70
commit
fd4e600639
57 changed files with 1735 additions and 208 deletions
|
@ -1,4 +1,5 @@
|
|||
<script src="/common/get-host-info.sub.js"></script>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="test-helpers.sub.js?pipe=sub"></script>
|
||||
<script>
|
||||
var host_info = get_host_info();
|
||||
|
@ -11,7 +12,7 @@ function boilerplate_test(url, msg) {
|
|||
worker.postMessage(msg);
|
||||
})
|
||||
.then(function(data) {
|
||||
window.parent.postMessage({results: data}, host_info['HTTPS_ORIGIN']);
|
||||
assert_equals(data, "This load was successfully intercepted.");
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
@ -8,6 +8,8 @@ self.onfetch = function(event) {
|
|||
if (url.indexOf("synthesized-response.txt") != -1) {
|
||||
event.respondWith(new Response(response_text));
|
||||
} else if (url.indexOf("synthesized-response.js") != -1) {
|
||||
event.respondWith(new Response(response_script));
|
||||
event.respondWith(new Response(
|
||||
response_script,
|
||||
{headers: {'Content-Type': 'application/javascript'}}));
|
||||
}
|
||||
};
|
||||
|
|
|
@ -106,12 +106,6 @@ promise_test(function(t) {
|
|||
var service_worker = 'resources/worker-load-interceptor.js';
|
||||
var scope = 'resources/';
|
||||
|
||||
window.addEventListener('message', t.step_func(on_message), false);
|
||||
function on_message(e) {
|
||||
assert_equals(e.data.results, "This load was successfully intercepted.");
|
||||
t.done();
|
||||
}
|
||||
|
||||
return service_worker_unregister_and_register(t, service_worker, scope)
|
||||
.then(function(r) {
|
||||
t.add_cleanup(function() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue