mirror of
https://github.com/servo/servo.git
synced 2025-08-16 02:45:36 +01:00
Update web-platform-tests to revision 7a767a52741f628430ffbbed46e7f3df68ba3534
Fixes #15648.
This commit is contained in:
parent
a1e4c547f0
commit
4fadf9b0b6
1184 changed files with 22551 additions and 9856 deletions
|
@ -0,0 +1,35 @@
|
|||
<!DOCTYPE html>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="/preload/resources/preload_helper.js"></script>
|
||||
<script src="../service-workers/service-worker/resources/test-helpers.sub.js"></script>
|
||||
<script>
|
||||
async_test(function(t) {
|
||||
var worker_url = 'resources/fetch-destination-worker.js';
|
||||
var scope = 'resources/empty.html';
|
||||
var registration;
|
||||
verifyPreloadAndRTSupport();
|
||||
|
||||
service_worker_unregister_and_register(t, worker_url, scope)
|
||||
.then(t.step_func(function(r) {
|
||||
registration = r;
|
||||
return wait_for_state(t, r.installing, 'activated');
|
||||
}))
|
||||
.then(t.step_func(function() {
|
||||
return with_iframe(scope);
|
||||
}))
|
||||
.then(t.step_func(function(frame) {
|
||||
var link = frame.contentWindow.document.createElement("link");
|
||||
link.as = "fetch";
|
||||
link.href = "resources/dummy.xml";
|
||||
link.rel = "preload";
|
||||
link.addEventListener("load", t.step_func_done(function() { registration.unregister(); }));
|
||||
link.addEventListener("error", t.step_func_done(function() {
|
||||
registration.unregister();
|
||||
assert_unreached("Fetch destination preload errored");
|
||||
}));
|
||||
frame.contentWindow.document.body.appendChild(link);
|
||||
}))
|
||||
.catch(unreached_rejection(t));
|
||||
}, 'Fetch destination preload');
|
||||
</script>
|
Loading…
Add table
Add a link
Reference in a new issue