mirror of
https://github.com/servo/servo.git
synced 2025-08-05 05:30:08 +01:00
Update web-platform-tests to revision c2b30ef30749b6a8f2cc832761dfe011e63d5e94
This commit is contained in:
parent
987e376ca7
commit
eda9b9b73a
142 changed files with 3513 additions and 851 deletions
|
@ -82,6 +82,41 @@ backgroundFetchTest(async (test, backgroundFetch) => {
|
|||
|
||||
}, 'Empty URL is OK.');
|
||||
|
||||
backgroundFetchTest(async (test, backgroundFetch) => {
|
||||
const registrationId = uniqueId();
|
||||
const registration =
|
||||
await backgroundFetch.fetch(registrationId,
|
||||
new Request('https://example/com', {
|
||||
method: 'PUT',
|
||||
}));
|
||||
|
||||
assert_equals(registration.id, registrationId);
|
||||
|
||||
const {type, eventRegistration, results} = await getMessageFromServiceWorker();
|
||||
|
||||
assert_equals(type, 'backgroundfetchsuccess');
|
||||
assert_equals(eventRegistration.result, 'success');
|
||||
assert_equals(eventRegistration.failureReason, '');
|
||||
}, 'Requests with PUT method require CORS Preflight and succeed.');
|
||||
|
||||
backgroundFetchTest(async (test, backgroundFetch) => {
|
||||
const registrationId = uniqueId();
|
||||
const registration =
|
||||
await backgroundFetch.fetch(registrationId,
|
||||
new Request('https://example/com', {
|
||||
method: 'POST',
|
||||
headers: {'Content-Type': 'text/json'}
|
||||
}));
|
||||
|
||||
assert_equals(registration.id, registrationId);
|
||||
|
||||
const {type, eventRegistration, results} = await getMessageFromServiceWorker();
|
||||
|
||||
assert_equals(type, 'backgroundfetchsuccess');
|
||||
assert_equals(eventRegistration.result, 'success');
|
||||
assert_equals(eventRegistration.failureReason, '');
|
||||
}, 'Requests with text/json content type require CORS Preflight and succeed.');
|
||||
|
||||
backgroundFetchTest(async (test, backgroundFetch) => {
|
||||
const registrationId = uniqueId();
|
||||
const registration =
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue