mirror of
https://github.com/servo/servo.git
synced 2025-08-13 09:25:32 +01:00
Update web-platform-tests to revision 4a5223502fa660ce03e470af6a61c8bc26c5a8ee
This commit is contained in:
parent
c5f7c9ccf3
commit
e891345f26
1328 changed files with 36632 additions and 20588 deletions
|
@ -9,7 +9,8 @@ let frame;
|
|||
|
||||
// Set up the service worker and the frame.
|
||||
promise_test(t => {
|
||||
const kScope = 'resources/empty.https.html';
|
||||
const kScope = 'resources/';
|
||||
const kFrame = 'resources/empty.https.html';
|
||||
const kScript = 'resources/fetch-destination-worker-no-load-event.js';
|
||||
return service_worker_unregister_and_register(t, kScript, kScope)
|
||||
.then(registration => {
|
||||
|
@ -20,7 +21,7 @@ promise_test(t => {
|
|||
return wait_for_state(t, registration.installing, 'activated');
|
||||
})
|
||||
.then(() => {
|
||||
return with_iframe(kScope);
|
||||
return with_iframe(kFrame);
|
||||
})
|
||||
.then(f => {
|
||||
frame = f;
|
||||
|
@ -111,7 +112,6 @@ promise_test(async t => {
|
|||
|
||||
// style destination
|
||||
/////////////////////
|
||||
|
||||
// @import - style destination
|
||||
promise_test(async t => {
|
||||
let node = frame.contentWindow.document.createElement("style");
|
||||
|
|
|
@ -2,11 +2,13 @@ self.addEventListener('fetch', function(event) {
|
|||
if (event.request.url.includes('dummy')) {
|
||||
event.waitUntil(async function() {
|
||||
let destination = new URL(event.request.url).searchParams.get("dest");
|
||||
let client = await self.clients.get(event.clientId);
|
||||
var result = "FAIL";
|
||||
if (event.request.destination == destination) {
|
||||
client.postMessage("PASS");
|
||||
} else {
|
||||
client.postMessage("FAIL");
|
||||
result = "PASS";
|
||||
}
|
||||
let cl = await clients.matchAll({includeUncontrolled: true});
|
||||
for (i = 0; i < cl.length; i++) {
|
||||
cl[i].postMessage(result);
|
||||
}
|
||||
}())
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue