Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(15)

Unified Diff: third_party/WebKit/LayoutTests/http/tests/background_fetch/resources/background-fetched-event-worker.js

Issue 2751523008: Update Background Fetch IDLs following spec changes (Closed)
Patch Set: Update Background Fetch IDLs following spec changes Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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.');

Powered by Google App Engine
This is Rietveld 408576698