mirror of
https://github.com/servo/servo.git
synced 2025-08-05 05:30:08 +01:00
Update web-platform-tests to revision 824f0c1df556305042b8aa8073c32e9ef86c3efa
This commit is contained in:
parent
bcafe4188f
commit
d0eccdba1a
131 changed files with 3087 additions and 705 deletions
|
@ -265,8 +265,8 @@ backgroundFetchTest(async (test, backgroundFetch) => {
|
|||
|
||||
backgroundFetchTest(async (test, backgroundFetch) => {
|
||||
const registration = await backgroundFetch.fetch(
|
||||
'my-id',
|
||||
['https://example.com', 'http://example.com']);
|
||||
'my-id',
|
||||
[location.origin, location.origin.replace('https', 'http')]);
|
||||
|
||||
const {type, eventRegistration, results} = await getMessageFromServiceWorker();
|
||||
|
||||
|
@ -274,7 +274,11 @@ backgroundFetchTest(async (test, backgroundFetch) => {
|
|||
assert_equals(eventRegistration.failureReason, 'fetch-error');
|
||||
|
||||
assert_equals(results.length, 2);
|
||||
assert_true(results[0].url.includes('https://example.com'));
|
||||
assert_equals(results[1].url, '');
|
||||
|
||||
const validResponse = results[0] ? results[0] : results[1];
|
||||
const nullResponse = !results[0] ? results[0] : results[1];
|
||||
|
||||
assert_true(validResponse.url.includes(location.origin));
|
||||
assert_equals(nullResponse, null);
|
||||
|
||||
}, 'Fetches with mixed content should fail.');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue