mirror of
https://github.com/servo/servo.git
synced 2025-08-05 21:50:18 +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
|
@ -145,6 +145,24 @@ backgroundFetchTest(async (test, backgroundFetch) => {
|
|||
|
||||
}, 'Using Background Fetch to successfully fetch a single resource');
|
||||
|
||||
backgroundFetchTest(async (test, backgroundFetch) => {
|
||||
const registrationId = uniqueId();
|
||||
const registration =
|
||||
await backgroundFetch.fetch(registrationId, 'resources/feature-name.txt');
|
||||
|
||||
assert_equals(registration.result, '');
|
||||
assert_equals(registration.failureReason, '');
|
||||
|
||||
const {type, eventRegistration, results} =
|
||||
await getMessageFromServiceWorker();
|
||||
assert_equals('backgroundfetchsuccess', type);
|
||||
|
||||
assert_equals(eventRegistration.id, registration.id);
|
||||
assert_equals(registration.result, 'success');
|
||||
assert_equals(registration.failureReason, '');
|
||||
|
||||
}, 'Registration object gets updated values when a background fetch completes.');
|
||||
|
||||
backgroundFetchTest(async (test, backgroundFetch) => {
|
||||
const registrationId = uniqueId();
|
||||
|
||||
|
@ -240,6 +258,9 @@ backgroundFetchTest(async (test, backgroundFetch) => {
|
|||
assert_equals(eventRegistration.result, 'failure');
|
||||
assert_equals(eventRegistration.failureReason, 'bad-status');
|
||||
|
||||
assert_equals(registration.result, 'failure');
|
||||
assert_equals(registration.failureReason, 'bad-status');
|
||||
|
||||
}, 'Using Background Fetch to fetch a non-existent resource should fail.');
|
||||
|
||||
backgroundFetchTest(async (test, backgroundFetch) => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue