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

Side by Side Diff: third_party/WebKit/LayoutTests/http/tests/background_fetch/resources/background-fetch-event-worker.js

Issue 2745573002: Implement the events for Background Fetch (Closed)
Patch Set: Implement the events for Background Fetch 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 unified diff | Download patch
OLDNEW
(Empty)
1 'use strict';
2
3 importScripts('/resources/testharness.js');
4
5 test(function() {
6 assert_own_property(self, 'BackgroundFetchEvent');
7
8 // The `tag` is required in the BackgroundFetchEventInit.
9 assert_throws(null, () => new BackgroundFetchEvent('BackgroundFetchEvent'));
10 assert_throws(null, () => new BackgroundFetchEvent('BackgroundFetchEvent', {}) );
11
12 const event = new BackgroundFetchEvent('BackgroundFetchEvent', {
13 tag: 'my-tag'
14 });
15
16 assert_equals(event.type, 'BackgroundFetchEvent');
17 assert_equals(event.cancelable, false);
18 assert_equals(event.bubbles, false);
19 assert_equals(event.tag, 'my-tag');
20
21 assert_inherits(event, 'waitUntil');
22
23 }, 'Verifies that the BackgroundFetchEvent can be constructed.');
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698