mirror of
https://github.com/servo/servo.git
synced 2025-08-15 02:15:33 +01:00
Update web-platform-tests to revision d647a1bc742a533186d8297cae2a2bee669c7780
This commit is contained in:
parent
bf192caf4b
commit
4cf0a092d0
41 changed files with 897 additions and 487 deletions
|
@ -21,7 +21,8 @@
|
|||
}
|
||||
|
||||
promise_test(async t => {
|
||||
const scope = SCOPE + "?q=aborted-not-intercepted";
|
||||
const suffix = "?q=aborted-not-intercepted";
|
||||
const scope = SCOPE + suffix;
|
||||
await setupRegistration(t, scope);
|
||||
const iframe = await with_iframe(scope);
|
||||
add_completion_callback(_ => iframe.remove());
|
||||
|
@ -33,8 +34,13 @@
|
|||
|
||||
const nextData = new Promise(resolve => {
|
||||
w.navigator.serviceWorker.addEventListener('message', function once(event) {
|
||||
w.navigator.serviceWorker.removeEventListener('message', once);
|
||||
resolve(event.data);
|
||||
// The message triggered by the iframe's document's fetch
|
||||
// request cannot get dispatched by the time we add the event
|
||||
// listener, so we have to guard against it.
|
||||
if (!event.data.endsWith(suffix)) {
|
||||
w.navigator.serviceWorker.removeEventListener('message', once);
|
||||
resolve(event.data);
|
||||
}
|
||||
})
|
||||
});
|
||||
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
self.addEventListener('fetch', function(event) {
|
||||
if (event.request.url.includes('dummy')) {
|
||||
const url = event.request.url;
|
||||
if (url.includes('dummy') && url.includes('?')) {
|
||||
event.waitUntil(async function() {
|
||||
let destination = new URL(event.request.url).searchParams.get("dest");
|
||||
let destination = new URL(url).searchParams.get("dest");
|
||||
var result = "FAIL";
|
||||
if (event.request.destination == destination) {
|
||||
result = "PASS";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue