mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
Update web-platform-tests to revision b'3b791e5b10812a4ca4473d93679fc70d1a7f5f88'
This commit is contained in:
parent
61fe4cf606
commit
17f4d58879
157 changed files with 1609 additions and 430 deletions
|
@ -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');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue