Update web-platform-tests to revision 4a5223502fa660ce03e470af6a61c8bc26c5a8ee

This commit is contained in:
WPT Sync Bot 2018-04-23 21:13:37 -04:00
parent c5f7c9ccf3
commit e891345f26
1328 changed files with 36632 additions and 20588 deletions

View file

@ -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");

View file

@ -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);
}
}())
}