Update web-platform-tests to revision 7c50c216081d6ea3c9afe553ee7b64534020a1b2

This commit is contained in:
WPT Sync Bot 2018-09-04 21:37:22 -04:00
parent 5063ac465b
commit f9ee2396ab
254 changed files with 2043 additions and 1285 deletions

View file

@ -102,3 +102,23 @@ backgroundFetchTest(async (test, backgroundFetch) => {
'This fetch should have thrown a quota exceeded error');
}, 'Background Fetch that exceeds the quota throws a QuotaExceededError');
backgroundFetchTest(async (test, backgroundFetch) => {
const registration = await backgroundFetch.fetch(
'my-id', ['resources/feature-name.txt', 'resources/feature-name.txt']);
const {type, eventRegistration, results} = await getMessageFromServiceWorker();
assert_equals('backgroundfetchsuccess', type);
assert_equals(results.length, 2);
assert_equals(eventRegistration.id, registration.id);
assert_equals(eventRegistration.state, "success");
assert_equals(eventRegistration.failureReason, "");
for (const result of results) {
assert_true(result.url.includes('resources/feature-name.txt'));
assert_equals(result.status, 200);
assert_equals(result.text, 'Background Fetch');
}
}, 'Fetches can have requests with duplicate URLs');