Bug 1536321 [wpt PR 15894] - Update interfaces/service-workers.idl, a=testonly
authorautofoolip <auto@foolip.org>
Mon, 15 Apr 2019 13:48:28 +0000
changeset 470712 37c5ab2e08c4d97d4b5a56bc8b0b3764393ff6b3
parent 470711 736420b342027a5477b46ba478035dd5ddd6be6c
child 470713 2e4b32a9d5ce344b46d68e103fb138a2b113af24
push id35911
push usercbrindusan@mozilla.com
push dateWed, 24 Apr 2019 21:55:25 +0000
treeherdermozilla-central@c7a9affeb604 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstestonly
bugs1536321, 15894
milestone68.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1536321 [wpt PR 15894] - Update interfaces/service-workers.idl, a=testonly Automatic update from web-platform-tests Update interfaces/service-workers.idl (#15894) Source: https://github.com/tidoust/reffy-reports/blob/e0218fe/whatwg/idl/service-workers.idl Build: https://travis-ci.org/tidoust/reffy-reports/builds/506822321 -- wpt-commits: 8142b088cc4f630c80e941cd5736d00fc2405e02 wpt-pr: 15894
testing/web-platform/tests/interfaces/service-workers.idl
--- a/testing/web-platform/tests/interfaces/service-workers.idl
+++ b/testing/web-platform/tests/interfaces/service-workers.idl
@@ -1,18 +1,19 @@
 // GENERATED CONTENT - DO NOT EDIT
 // Content was automatically extracted by Reffy into reffy-reports
 // (https://github.com/tidoust/reffy-reports)
-// Source: Service Workers 1 (https://w3c.github.io/ServiceWorker/v1/)
+// Source: Service Workers Nightly (https://w3c.github.io/ServiceWorker/)
 
 [SecureContext, Exposed=(Window,Worker)]
 interface ServiceWorker : EventTarget {
   readonly attribute USVString scriptURL;
   readonly attribute ServiceWorkerState state;
-  void postMessage(any message, optional sequence<object> transfer = []);
+  void postMessage(any message, sequence<object> transfer);
+  void postMessage(any message, optional PostMessageOptions options);
 
   // event
   attribute EventHandler onstatechange;
 };
 ServiceWorker includes AbstractWorker;
 
 enum ServiceWorkerState {
   "installing",
@@ -22,16 +23,17 @@ enum ServiceWorkerState {
   "redundant"
 };
 
 [SecureContext, Exposed=(Window,Worker)]
 interface ServiceWorkerRegistration : EventTarget {
   readonly attribute ServiceWorker? installing;
   readonly attribute ServiceWorker? waiting;
   readonly attribute ServiceWorker? active;
+  [SameObject] readonly attribute NavigationPreloadManager navigationPreload;
 
   readonly attribute USVString scope;
   readonly attribute ServiceWorkerUpdateViaCache updateViaCache;
 
   [NewObject] Promise<void> update();
   [NewObject] Promise<boolean> unregister();
 
   // event
@@ -71,16 +73,29 @@ interface ServiceWorkerContainer : Event
 };
 
 dictionary RegistrationOptions {
   USVString scope;
   WorkerType type = "classic";
   ServiceWorkerUpdateViaCache updateViaCache = "imports";
 };
 
+[SecureContext, Exposed=(Window,Worker)]
+interface NavigationPreloadManager {
+  Promise<void> enable();
+  Promise<void> disable();
+  Promise<void> setHeaderValue(ByteString value);
+  Promise<NavigationPreloadState> getState();
+};
+
+dictionary NavigationPreloadState {
+  boolean enabled = false;
+  ByteString headerValue;
+};
+
 [Global=(Worker,ServiceWorker), Exposed=ServiceWorker]
 interface ServiceWorkerGlobalScope : WorkerGlobalScope {
   [SameObject] readonly attribute Clients clients;
   [SameObject] readonly attribute ServiceWorkerRegistration registration;
 
   [NewObject] Promise<void> skipWaiting();
 
   attribute EventHandler oninstall;
@@ -93,17 +108,18 @@ interface ServiceWorkerGlobalScope : Wor
 };
 
 [Exposed=ServiceWorker]
 interface Client {
   readonly attribute USVString url;
   readonly attribute FrameType frameType;
   readonly attribute DOMString id;
   readonly attribute ClientType type;
-  void postMessage(any message, optional sequence<object> transfer = []);
+  void postMessage(any message, sequence<object> transfer);
+  void postMessage(any message, optional PostMessageOptions options);
 };
 
 [Exposed=ServiceWorker]
 interface WindowClient : Client {
   readonly attribute VisibilityState visibilityState;
   readonly attribute boolean focused;
   [SameObject] readonly attribute FrozenArray<USVString> ancestorOrigins;
   [NewObject] Promise<WindowClient> focus();
@@ -145,24 +161,30 @@ interface ExtendableEvent : Event {
 
 dictionary ExtendableEventInit : EventInit {
   // Defined for the forward compatibility across the derived events
 };
 
 [Constructor(DOMString type, FetchEventInit eventInitDict), Exposed=ServiceWorker]
 interface FetchEvent : ExtendableEvent {
   [SameObject] readonly attribute Request request;
+  readonly attribute Promise<any> preloadResponse;
   readonly attribute DOMString clientId;
+  readonly attribute DOMString resultingClientId;
+  readonly attribute DOMString replacesClientId;
 
   void respondWith(Promise<Response> r);
 };
 
 dictionary FetchEventInit : ExtendableEventInit {
   required Request request;
+  Promise<any> preloadResponse;
   DOMString clientId = "";
+  DOMString resultingClientId = "";
+  DOMString replacesClientId = "";
 };
 
 [Constructor(DOMString type, optional ExtendableMessageEventInit eventInitDict), Exposed=ServiceWorker]
 interface ExtendableMessageEvent : ExtendableEvent {
   readonly attribute any data;
   readonly attribute USVString origin;
   readonly attribute DOMString lastEventId;
   [SameObject] readonly attribute (Client or ServiceWorker or MessagePort)? source;
@@ -172,17 +194,17 @@ interface ExtendableMessageEvent : Exten
 dictionary ExtendableMessageEventInit : ExtendableEventInit {
   any data = null;
   USVString origin = "";
   DOMString lastEventId = "";
   (Client or ServiceWorker or MessagePort)? source = null;
   sequence<MessagePort> ports = [];
 };
 
-partial interface WindowOrWorkerGlobalScope {
+partial interface mixin WindowOrWorkerGlobalScope {
   [SecureContext, SameObject] readonly attribute CacheStorage caches;
 };
 
 [SecureContext, Exposed=(Window,Worker)]
 interface Cache {
   [NewObject] Promise<any> match(RequestInfo request, optional CacheQueryOptions options);
   [NewObject] Promise<FrozenArray<Response>> matchAll(optional RequestInfo request, optional CacheQueryOptions options);
   [NewObject] Promise<void> add(RequestInfo request);