| Index: third_party/WebKit/LayoutTests/http/tests/background_fetch/resources/background-fetched-event-worker.js
|
| diff --git a/third_party/WebKit/LayoutTests/http/tests/background_fetch/resources/background-fetched-event-worker.js b/third_party/WebKit/LayoutTests/http/tests/background_fetch/resources/background-fetched-event-worker.js
|
| index 5eed0c6e19662307017dc1a3c0fdd91b759506ee..7a5eb3a33542d8798285213b5a44d439d78078b9 100644
|
| --- a/third_party/WebKit/LayoutTests/http/tests/background_fetch/resources/background-fetched-event-worker.js
|
| +++ b/third_party/WebKit/LayoutTests/http/tests/background_fetch/resources/background-fetched-event-worker.js
|
| @@ -5,22 +5,22 @@ importScripts('/resources/testharness.js');
|
| test(function() {
|
| assert_own_property(self, 'BackgroundFetchedEvent');
|
|
|
| - // The `tag` and `completedFetches` are required options in the
|
| + // The `tag` and `fetches` are required options in the
|
| // BackgroundFetchedEventInit. The latter must be a sequence of
|
| - // BackgroundFetchSettledRequest instances.
|
| + // BackgroundFetchSettledFetch instances.
|
| assert_throws(null, () => new BackgroundFetchedEvent('BackgroundFetchedEvent'));
|
| assert_throws(null, () => new BackgroundFetchedEvent('BackgroundFetchedEvent', {}));
|
| assert_throws(null, () => new BackgroundFetchedEvent('BackgroundFetchedEvent', { tag: 'foo' }));
|
| - assert_throws(null, () => new BackgroundFetchedEvent('BackgroundFetchedEvent', { tag: 'foo', completedFetches: 'bar' }));
|
| + assert_throws(null, () => new BackgroundFetchedEvent('BackgroundFetchedEvent', { tag: 'foo', fetches: 'bar' }));
|
|
|
| - const completedFetches = [
|
| - new BackgroundFetchSettledRequest(new Request('non-existing-image.png'), new Response()),
|
| - new BackgroundFetchSettledRequest(new Request('non-existing-image-2.png'), new Response())
|
| + const fetches = [
|
| + new BackgroundFetchSettledFetch(new Request('non-existing-image.png'), new Response()),
|
| + new BackgroundFetchSettledFetch(new Request('non-existing-image-2.png'), new Response())
|
| ];
|
|
|
| const event = new BackgroundFetchedEvent('BackgroundFetchedEvent', {
|
| tag: 'my-tag',
|
| - completedFetches
|
| + fetches
|
| });
|
|
|
| assert_equals(event.type, 'BackgroundFetchedEvent');
|
| @@ -28,9 +28,10 @@ test(function() {
|
| assert_equals(event.bubbles, false);
|
| assert_equals(event.tag, 'my-tag');
|
|
|
| - assert_true(Array.isArray(event.completedFetches));
|
| - assert_array_equals(event.completedFetches, completedFetches);
|
| + assert_true(Array.isArray(event.fetches));
|
| + assert_array_equals(event.fetches, fetches);
|
|
|
| + assert_inherits(event, 'updateUI');
|
| assert_inherits(event, 'waitUntil');
|
|
|
| }, 'Verifies that the BackgroundFetchedEvent can be constructed.');
|
|
|