Update web-platform-tests to revision b'3b791e5b10812a4ca4473d93679fc70d1a7f5f88'

This commit is contained in:
WPT Sync Bot 2023-03-02 01:47:05 +00:00
parent 61fe4cf606
commit 17f4d58879
157 changed files with 1609 additions and 430 deletions

View file

@ -30,22 +30,29 @@ backgroundFetchTest((t, bgFetch) => {
return bgFetch.fetch(uniqueId(), 'http://localhost');
}, 'localhost http: fetch should register ok');
function testBgFetch(bgFetch, url)
{
return bgFetch.fetch(uniqueId(), url).then(fetch => {
return fetch.match(url);
}).then(match => match.responseReady);
}
backgroundFetchTest((t, bgFetch) => {
return promise_rejects_js(t, TypeError,
bgFetch.fetch(uniqueId(), 'wss:127.0.0.1'));
testBgFetch(bgFetch, 'wss:127.0.0.1'));
}, 'wss: fetch should reject');
backgroundFetchTest((t, bgFetch) => {
return promise_rejects_js(t, TypeError,
bgFetch.fetch(uniqueId(), 'file:///'));
testBgFetch(bgFetch, 'file:///'));
}, 'file: fetch should reject');
backgroundFetchTest((t, bgFetch) => {
return promise_rejects_js(t, TypeError,
bgFetch.fetch(uniqueId(), 'data:text/plain,foo'));
testBgFetch(bgFetch, 'data:text/plain,foo'));
}, 'data: fetch should reject');
backgroundFetchTest((t, bgFetch) => {
return promise_rejects_js(t, TypeError,
bgFetch.fetch(uniqueId(), 'foobar:bazqux'));
testBgFetch(bgFetch, 'foobar:bazqux'));
}, 'unknown scheme fetch should reject');