Bug 1113522 - Expose ServiceWorker in Workers. r=dom-worker-reviewers,webidl,edenchuang,emilio

We are able to remove ServiceWorkerVisible and instead use
ServiceWorkersEnabled in its place since we are no longer limiting
where ServiceWorker instances are exposed.

The correctness of ExtendableMessageEvent.source is addressed later in
the stack.

Although we enable skip-waiting-installed.https.html here, we also have
to make it expected it will sometimes fail due to an inherent IPC race;
bug 1926641 describes the situation.

Differential Revision: https://phabricator.services.mozilla.com/D180914
This commit is contained in:
Andrew Sutherland
2024-10-24 03:02:37 +00:00
parent b4a44ba3e4
commit 5fa466d4ef
30 changed files with 134 additions and 336 deletions

View File

@@ -343,7 +343,7 @@ class nsGlobalWindowInner final : public mozilla::dom::EventTarget,
GetExistingDebuggerNotificationManager() override;
mozilla::Maybe<mozilla::dom::ClientInfo> GetClientInfo() const override;
mozilla::Maybe<mozilla::dom::ClientState> GetClientState() const;
mozilla::Maybe<mozilla::dom::ClientState> GetClientState() const final;
mozilla::Maybe<mozilla::dom::ServiceWorkerDescriptor> GetController()
const override;

View File

@@ -39,6 +39,7 @@ using mozilla::MicroTaskRunnable;
using mozilla::dom::BlobURLProtocolHandler;
using mozilla::dom::CallerType;
using mozilla::dom::ClientInfo;
using mozilla::dom::ClientState;
using mozilla::dom::Report;
using mozilla::dom::ReportingObserver;
using mozilla::dom::ServiceWorker;
@@ -281,6 +282,12 @@ Maybe<ClientInfo> nsIGlobalObject::GetClientInfo() const {
return Maybe<ClientInfo>();
}
Maybe<ClientState> nsIGlobalObject::GetClientState() const {
// By default globals do not expose themselves as a client. Only real
// window and worker globals are currently considered clients.
return Maybe<ClientState>();
}
Maybe<nsID> nsIGlobalObject::GetAgentClusterId() const {
Maybe<ClientInfo> ci = GetClientInfo();
if (ci.isSome()) {

View File

@@ -10,6 +10,7 @@
#include "mozilla/LinkedList.h"
#include "mozilla/Maybe.h"
#include "mozilla/dom/ClientInfo.h"
#include "mozilla/dom/ClientState.h"
#include "mozilla/dom/ServiceWorkerDescriptor.h"
#include "mozilla/OriginTrials.h"
#include "nsContentUtils.h"
@@ -194,6 +195,7 @@ class nsIGlobalObject : public nsISupports {
}
virtual mozilla::Maybe<mozilla::dom::ClientInfo> GetClientInfo() const;
virtual mozilla::Maybe<mozilla::dom::ClientState> GetClientState() const;
virtual mozilla::Maybe<nsID> GetAgentClusterId() const;

View File

@@ -110,7 +110,7 @@ addEventListener("message", function workerWrapperOnMessage(e) {
});
}
}
if ("ServiceWorker" in self) {
if ("ServiceWorkerGlobalScope" in self) {
self.clients
.matchAll({ includeUncontrolled: true })
.then(function (clients) {

View File

@@ -7,16 +7,27 @@
#ifndef _mozilla_dom_ClientState_h
#define _mozilla_dom_ClientState_h
#include "mozilla/dom/DocumentBinding.h"
#include "mozilla/Maybe.h"
#include "mozilla/StorageAccess.h"
#include "mozilla/TimeStamp.h"
#include "mozilla/UniquePtr.h"
#include "mozilla/Variant.h"
#include "nsContentUtils.h"
namespace mozilla {
// We forward-declare this because including StorageAccess.h causes cbindgen to
// have problems due to StorageAccess.h's include of BrowsingContext.h which
// includes SyncedContext.h.
enum class StorageAccess;
} // namespace mozilla
namespace mozilla::dom {
// We forward-declare this because otherwise we get an include cycle through
// DocumentBinding.h including ShadowRoot.h including DOMEventTargetHelper.h
// including GlobalTeardownObserver.h including nsIGlobalObject.h which needs
// to include this file.
enum class VisibilityState : uint8_t;
class IPCClientState;
class IPCClientWindowState;
class IPCClientWorkerState;

View File

@@ -416,7 +416,7 @@ already_AddRefed<PushManager> PushManager::Constructor(GlobalObject& aGlobal,
}
bool PushManager::IsEnabled(JSContext* aCx, JSObject* aGlobal) {
return StaticPrefs::dom_push_enabled() && ServiceWorkerVisible(aCx, aGlobal);
return StaticPrefs::dom_push_enabled() && ServiceWorkersEnabled(aCx, aGlobal);
}
already_AddRefed<Promise> PushManager::Subscribe(

View File

@@ -9,6 +9,7 @@
#include "js/RootingAPI.h"
#include "js/TypeDecls.h"
#include "mozilla/dom/ServiceWorkerUtils.h"
#include "nsCOMPtr.h"
#include "nsCycleCollectionParticipant.h"
#include "nsTArray.h"
@@ -22,8 +23,6 @@ class ErrorResult;
namespace dom {
bool ServiceWorkerVisible(JSContext* aCx, JSObject* aGlobal);
class PushSubscriptionOptions final : public nsISupports,
public nsWrapperCache {
public:

View File

@@ -33,7 +33,7 @@ bool NavigationPreloadManager::IsValidHeader(const nsACString& aHeader) {
bool NavigationPreloadManager::IsEnabled(JSContext* aCx, JSObject* aGlobal) {
return StaticPrefs::dom_serviceWorkers_navigationPreload_enabled() &&
ServiceWorkerVisible(aCx, aGlobal);
ServiceWorkersEnabled(aCx, aGlobal);
}
NavigationPreloadManager::NavigationPreloadManager(

View File

@@ -51,7 +51,6 @@ ServiceWorker::ServiceWorker(nsIGlobalObject* aGlobal,
mDescriptor(aDescriptor),
mShutdown(false),
mLastNotifiedState(ServiceWorkerState::Installing) {
MOZ_ASSERT(NS_IsMainThread());
MOZ_DIAGNOSTIC_ASSERT(aGlobal);
PBackgroundChild* parentActor =
@@ -118,10 +117,7 @@ ServiceWorker::ServiceWorker(nsIGlobalObject* aGlobal,
}
}
ServiceWorker::~ServiceWorker() {
MOZ_ASSERT(NS_IsMainThread());
Shutdown();
}
ServiceWorker::~ServiceWorker() { Shutdown(); }
NS_IMPL_CYCLE_COLLECTION_INHERITED(ServiceWorker, DOMEventTargetHelper,
mRegistration);
@@ -135,8 +131,6 @@ NS_INTERFACE_MAP_END_INHERITING(DOMEventTargetHelper)
JSObject* ServiceWorker::WrapObject(JSContext* aCx,
JS::Handle<JSObject*> aGivenProto) {
MOZ_ASSERT(NS_IsMainThread());
return ServiceWorker_Binding::Wrap(aCx, this, aGivenProto);
}
@@ -181,17 +175,27 @@ void ServiceWorker::PostMessage(JSContext* aCx, JS::Handle<JS::Value> aMessage,
return;
}
nsPIDOMWindowInner* window = GetOwnerWindow();
if (NS_WARN_IF(!window || !window->GetExtantDoc())) {
nsIGlobalObject* global = GetOwnerGlobal();
if (NS_WARN_IF(!global)) {
aRv.Throw(NS_ERROR_DOM_INVALID_STATE_ERR);
return;
}
auto storageAllowed = StorageAllowedForWindow(window);
if (storageAllowed != StorageAccess::eAllow &&
(!StaticPrefs::privacy_partition_serviceWorkers() ||
!StoragePartitioningEnabled(
storageAllowed, window->GetExtantDoc()->CookieJarSettings()))) {
Maybe<ClientInfo> clientInfo = global->GetClientInfo();
Maybe<ClientState> clientState = global->GetClientState();
if (NS_WARN_IF(clientInfo.isNothing() || clientState.isNothing())) {
aRv.Throw(NS_ERROR_DOM_INVALID_STATE_ERR);
return;
}
auto storageAllowed = clientState.ref().GetStorageAccess();
// This check should be removed as part of bug 1776271 when we should be able
// to have a stronger invariant about how content should not be able to see
// a ServiceWorker instance if there is no access to storage. For now we
// retain this check as a defense-in-depth mechanism at runtime and a
// non-diagnostic assert for test purposes.
MOZ_ASSERT(storageAllowed != StorageAccess::eDeny);
if (storageAllowed == StorageAccess::eDeny) {
ServiceWorkerManager::LocalizeAndReportToAllClients(
mDescriptor.Scope(), "ServiceWorkerPostMessageStorageError",
nsTArray<nsString>{NS_ConvertUTF8toUTF16(mDescriptor.Scope())});
@@ -199,13 +203,6 @@ void ServiceWorker::PostMessage(JSContext* aCx, JS::Handle<JS::Value> aMessage,
return;
}
Maybe<ClientInfo> clientInfo = window->GetClientInfo();
Maybe<ClientState> clientState = window->GetClientState();
if (NS_WARN_IF(clientInfo.isNothing() || clientState.isNothing())) {
aRv.Throw(NS_ERROR_DOM_INVALID_STATE_ERR);
return;
}
JS::Rooted<JS::Value> transferable(aCx, JS::UndefinedValue());
aRv = nsContentUtils::CreateJSValueFromSequenceOfObject(aCx, aTransferable,
&transferable);
@@ -221,7 +218,7 @@ void ServiceWorker::PostMessage(JSContext* aCx, JS::Handle<JS::Value> aMessage,
// deserialization and sharing memory objects are not propagated to the other
// process.
JS::CloneDataPolicy clonePolicy;
if (nsGlobalWindowInner::Cast(window)->IsSharedMemoryAllowed()) {
if (global->IsSharedMemoryAllowed()) {
clonePolicy.allowSharedMemoryObjects();
}
@@ -232,15 +229,17 @@ void ServiceWorker::PostMessage(JSContext* aCx, JS::Handle<JS::Value> aMessage,
}
// The value of CloneScope() is set while StructuredCloneData::Write(). If the
// aValue contiains a shared memory object, then the scope will be restricted
// aValue contains a shared memory object, then the scope will be restricted
// and thus return SameProcess. If not, it will return DifferentProcess.
//
// When we postMessage a shared memory object from a window to a service
// worker, the object must be sent from a cross-origin isolated process to
// another one. So, we mark mark this data as an error message data if the
// scope is limited to same process.
// We know that an attempt to postMessage a shared memory object will result
// in an error if the source and target aren't in the same agent cluster and
// ServiceWorkers are inherently in a different agent cluster from windows,
// so convert to an error if this binding is attached to a window (which must
// be the case if this is the main thread).
if (data->CloneScope() ==
StructuredCloneHolder::StructuredCloneScope::SameProcess) {
StructuredCloneHolder::StructuredCloneScope::SameProcess &&
NS_IsMainThread()) {
data->SetAsErrorMessageData();
}

View File

@@ -68,7 +68,7 @@ class ServiceWorker final : public DOMEventTargetHelper {
void RevokeActor(ServiceWorkerChild* aActor);
private:
ServiceWorker(nsIGlobalObject* aWindow,
ServiceWorker(nsIGlobalObject* aGlobal,
const ServiceWorkerDescriptor& aDescriptor);
// This class is reference-counted and will be destroyed from Release().

View File

@@ -15,6 +15,7 @@
#include "mozilla/dom/File.h"
#include "mozilla/dom/Promise.h"
#include "mozilla/dom/Response.h"
#include "mozilla/dom/ServiceWorkerUtils.h"
#include "mozilla/dom/WorkerCommon.h"
#include "nsProxyRelease.h"
@@ -34,9 +35,6 @@ class ResponseOrPromise;
class ServiceWorker;
class ServiceWorkerRegistrationInfo;
// Defined in ServiceWorker.cpp
bool ServiceWorkerVisible(JSContext* aCx, JSObject* aObj);
class CancelChannelRunnable final : public Runnable {
nsMainThreadPtrHandle<nsIInterceptedChannel> mChannel;
nsMainThreadPtrHandle<ServiceWorkerRegistrationInfo> mRegistration;

View File

@@ -638,11 +638,8 @@ void ServiceWorkerRegistration::UpdateStateInternal(
});
// Clear all workers if the registration has been detached from the global.
// Also, we cannot expose ServiceWorker objects on worker threads yet, so
// do the same on when off-main-thread. This main thread check should be
// removed as part of bug 1113522.
nsCOMPtr<nsIGlobalObject> global = GetParentObject();
if (!global || !NS_IsMainThread()) {
if (!global) {
return;
}

View File

@@ -23,7 +23,7 @@
namespace mozilla::dom {
static bool IsServiceWorkersTestingEnabledInWindow(JSObject* const aGlobal) {
static bool IsServiceWorkersTestingEnabledInGlobal(JSObject* const aGlobal) {
if (const nsCOMPtr<nsPIDOMWindowInner> innerWindow =
Navigator::GetWindowFromGlobal(aGlobal)) {
if (auto* bc = innerWindow->GetBrowsingContext()) {
@@ -33,60 +33,38 @@ static bool IsServiceWorkersTestingEnabledInWindow(JSObject* const aGlobal) {
return false;
}
static bool IsInPrivateBrowsing(JSContext* const aCx) {
if (const nsCOMPtr<nsIGlobalObject> global = xpc::CurrentNativeGlobal(aCx)) {
if (const nsCOMPtr<nsIPrincipal> principal = global->PrincipalOrNull()) {
return principal->GetIsInPrivateBrowsing();
}
}
return false;
}
bool ServiceWorkersEnabled(JSContext* aCx, JSObject* aGlobal) {
MOZ_ASSERT(NS_IsMainThread());
if (!StaticPrefs::dom_serviceWorkers_enabled()) {
return false;
}
// xpc::CurrentNativeGlobal below requires rooting
JS::Rooted<JSObject*> global(aCx, aGlobal);
JS::Rooted<JSObject*> jsGlobal(aCx, aGlobal);
nsIGlobalObject* global = xpc::CurrentNativeGlobal(aCx);
if (IsInPrivateBrowsing(aCx)) {
return false;
}
// Allow a webextension principal to register a service worker script with
// a moz-extension url only if 'extensions.service_worker_register.allowed'
// is true.
if (!StaticPrefs::extensions_serviceWorkerRegister_allowed()) {
nsIPrincipal* principal = nsContentUtils::SubjectPrincipal(aCx);
if (principal && BasePrincipal::Cast(principal)->AddonPolicy()) {
if (const nsCOMPtr<nsIPrincipal> principal = global->PrincipalOrNull()) {
// ServiceWorkers are currently not available in PrivateBrowsing.
// Bug 1320796 will change this.
if (principal->GetIsInPrivateBrowsing()) {
return false;
}
// Allow a webextension principal to register a service worker script with
// a moz-extension url only if 'extensions.service_worker_register.allowed'
// is true.
if (!StaticPrefs::extensions_serviceWorkerRegister_allowed()) {
if (principal->GetIsAddonOrExpandedAddonPrincipal()) {
return false;
}
}
}
if (IsSecureContextOrObjectIsFromSecureContext(aCx, global)) {
if (IsSecureContextOrObjectIsFromSecureContext(aCx, jsGlobal)) {
return true;
}
return StaticPrefs::dom_serviceWorkers_testing_enabled() ||
IsServiceWorkersTestingEnabledInWindow(global);
}
bool ServiceWorkerVisible(JSContext* aCx, JSObject* aGlobal) {
if (NS_IsMainThread()) {
// We want to expose ServiceWorker interface only when
// navigator.serviceWorker is available. Currently it may not be available
// with some reasons:
// 1. navigator.serviceWorker is not supported in workers. (bug 1131324)
return ServiceWorkersEnabled(aCx, aGlobal);
}
// We are already in ServiceWorker and interfaces need to be exposed for e.g.
// globalThis.registration.serviceWorker. Note that navigator.serviceWorker
// is still not supported. (bug 1131324)
return IS_INSTANCE_OF(ServiceWorkerGlobalScope, aGlobal);
IsServiceWorkersTestingEnabledInGlobal(jsGlobal);
}
bool ServiceWorkerRegistrationDataIsValid(

View File

@@ -57,8 +57,6 @@ void ServiceWorkerScopeAndScriptAreValid(const ClientInfo& aClientInfo,
bool ServiceWorkersEnabled(JSContext* aCx, JSObject* aGlobal);
bool ServiceWorkerVisible(JSContext* aCx, JSObject* aGlobal);
} // namespace dom
} // namespace mozilla

View File

@@ -1,6 +1,7 @@
function OnMessage(e) {
if (e.data.msg == "whoareyou") {
if ("ServiceWorker" in self) {
// ("ServiceWorker" is now exposed in workers.)
if ("ServiceWorkerGlobalScope" in self) {
self.clients.matchAll().then(function (clients) {
clients[0].postMessage({ result: "serviceworker" });
});

View File

@@ -54,7 +54,7 @@ addEventListener("message", function workerWrapperOnMessage(e) {
}
}
if ("ServiceWorker" in self) {
if ("ServiceWorkerGlobalScope" in self) {
// Fetch requests from a service worker are not intercepted.
self.isSWPresent = false;

View File

@@ -7,7 +7,7 @@
* http://slightlyoff.github.io/ServiceWorker/spec/service_worker/index.html
*/
[Func="ServiceWorkerVisible",
[Func="ServiceWorkersEnabled",
Exposed=(ServiceWorker)]
interface FetchEvent : ExtendableEvent {
constructor(DOMString type, FetchEventInit eventInitDict);

View File

@@ -41,7 +41,7 @@ dictionary PushSubscriptionInit
EpochTimeStamp? expirationTime = null;
};
[Exposed=(Window,Worker), Func="ServiceWorkerVisible"]
[Exposed=(Window,Worker), Func="ServiceWorkersEnabled"]
interface PushSubscription
{
[Throws, ChromeOnly]

View File

@@ -7,7 +7,7 @@
* https://w3c.github.io/push-api/
*/
[Exposed=(Window,Worker), Func="ServiceWorkerVisible"]
[Exposed=(Window,Worker), Func="ServiceWorkersEnabled"]
interface PushSubscriptionOptions
{
[SameObject, Throws]

View File

@@ -8,10 +8,7 @@
*
*/
// Still unclear what should be subclassed.
// https://github.com/slightlyoff/ServiceWorker/issues/189
[Func="ServiceWorkerVisible",
// FIXME(nsm): Bug 1113522. This is exposed to satisfy webidl constraints, but it won't actually work.
[Func="ServiceWorkersEnabled",
Exposed=(Window,Worker)]
interface ServiceWorker : EventTarget {
readonly attribute USVString scriptURL;

View File

@@ -10,7 +10,7 @@
* https://wicg.github.io/cookie-store/#idl-index
*/
[Func="ServiceWorkerVisible",
[Func="ServiceWorkersEnabled",
Exposed=(Window,Worker)]
interface ServiceWorkerRegistration : EventTarget {
readonly attribute ServiceWorker? installing;

View File

@@ -69,6 +69,7 @@
#include "mozilla/dom/WebTaskSchedulerWorker.h"
#include "mozilla/dom/ScriptSettings.h"
#include "mozilla/dom/SerializedStackHolder.h"
#include "mozilla/dom/ServiceWorker.h"
#include "mozilla/dom/ServiceWorkerDescriptor.h"
#include "mozilla/dom/ServiceWorkerGlobalScopeBinding.h"
#include "mozilla/dom/ServiceWorkerManager.h"
@@ -303,6 +304,16 @@ Maybe<ClientInfo> WorkerGlobalScopeBase::GetClientInfo() const {
return Some(mClientSource->Info());
}
Maybe<ClientState> WorkerGlobalScopeBase::GetClientState() const {
Result<ClientState, ErrorResult> res = mClientSource->SnapshotState();
if (res.isOk()) {
return Some(res.unwrap());
}
res.unwrapErr().SuppressException();
return Nothing();
}
Maybe<ServiceWorkerDescriptor> WorkerGlobalScopeBase::GetController() const {
return mClientSource->GetController();
}
@@ -833,6 +844,27 @@ WorkerGlobalScope::GetDebuggerNotificationType() const {
return Some(EventCallbackDebuggerNotificationType::Global);
}
RefPtr<ServiceWorker> WorkerGlobalScope::GetOrCreateServiceWorker(
const ServiceWorkerDescriptor& aDescriptor) {
RefPtr<ServiceWorker> ref;
ForEachGlobalTeardownObserver(
[&](GlobalTeardownObserver* aObserver, bool* aDoneOut) {
RefPtr<ServiceWorker> sw = do_QueryObject(aObserver);
if (!sw || !sw->Descriptor().Matches(aDescriptor)) {
return;
}
ref = std::move(sw);
*aDoneOut = true;
});
if (!ref) {
ref = ServiceWorker::Create(this, aDescriptor);
}
return ref;
}
RefPtr<ServiceWorkerRegistration>
WorkerGlobalScope::GetServiceWorkerRegistration(
const ServiceWorkerRegistrationDescriptor& aDescriptor) const {

View File

@@ -132,6 +132,7 @@ class WorkerGlobalScopeBase : public DOMEventTargetHelper,
StorageAccess GetStorageAccess() final;
Maybe<ClientInfo> GetClientInfo() const final;
Maybe<ClientState> GetClientState() const final;
Maybe<ServiceWorkerDescriptor> GetController() const final;
@@ -233,6 +234,9 @@ class WorkerGlobalScope : public WorkerGlobalScopeBase {
void NoteShuttingDown();
// nsIGlobalObject implementation
RefPtr<ServiceWorker> GetOrCreateServiceWorker(
const ServiceWorkerDescriptor& aDescriptor) final;
RefPtr<ServiceWorkerRegistration> GetServiceWorkerRegistration(
const ServiceWorkerRegistrationDescriptor& aDescriptor) const final;

View File

@@ -276,6 +276,8 @@ let interfaceNamesInGlobalScope = [
// IMPORTANT: Do not change this list without review from a DOM peer!
{ name: "MessagePort", insecureContext: true },
// IMPORTANT: Do not change this list without review from a DOM peer!
"NavigationPreloadManager",
// IMPORTANT: Do not change this list without review from a DOM peer!
{ name: "NetworkInformation", insecureContext: true, disabled: true },
// IMPORTANT: Do not change this list without review from a DOM peer!
{ name: "Notification", insecureContext: true },
@@ -310,6 +312,11 @@ let interfaceNamesInGlobalScope = [
// IMPORTANT: Do not change this list without review from a DOM peer!
{ name: "PromiseRejectionEvent", insecureContext: true },
// IMPORTANT: Do not change this list without review from a DOM peer!
"PushManager",
// IMPORTANT: Do not change this list without review from a DOM peer!
"PushSubscription",
// IMPORTANT: Do not change this list without review from a DOM peer!
"PushSubscriptionOptions",
// IMPORTANT: Do not change this list without review from a DOM peer!
{ name: "ReadableByteStreamController", insecureContext: true },
// IMPORTANT: Do not change this list without review from a DOM peer!
@@ -337,6 +344,10 @@ let interfaceNamesInGlobalScope = [
// IMPORTANT: Do not change this list without review from a DOM peer!
{ name: "Scheduler", insecureContext: true, nightly: true },
// IMPORTANT: Do not change this list without review from a DOM peer!
"ServiceWorker",
// IMPORTANT: Do not change this list without review from a DOM peer!
"ServiceWorkerRegistration",
// IMPORTANT: Do not change this list without review from a DOM peer!
{ name: "StorageManager", fennec: false },
// IMPORTANT: Do not change this list without review from a DOM peer!
{ name: "SubtleCrypto" },

View File

@@ -5297,7 +5297,7 @@
# is not controlled by this pref, only the extension code ability to use
# navigator.serviceWorker.register is locked behind this pref.
- name: extensions.serviceWorkerRegister.allowed
type: bool
type: RelaxedAtomicBool
value: false
mirror: always

View File

@@ -93,12 +93,6 @@ prefs: [dom.webnotifications.requireinteraction.enabled:true, dom.webnotificatio
[Notification interface: attribute badge]
expected: FAIL
[ServiceWorkerRegistration interface: operation showNotification(DOMString, optional NotificationOptions)]
expected: FAIL
[ServiceWorkerRegistration interface: operation getNotifications(optional GetNotificationOptions)]
expected: FAIL
[idlharness.https.any.sharedworker.html]
[Notification interface: attribute image]
@@ -133,9 +127,3 @@ prefs: [dom.webnotifications.requireinteraction.enabled:true, dom.webnotificatio
[Notification interface: attribute badge]
expected: FAIL
[ServiceWorkerRegistration interface: operation showNotification(DOMString, optional NotificationOptions)]
expected: FAIL
[ServiceWorkerRegistration interface: operation getNotifications(optional GetNotificationOptions)]
expected: FAIL

View File

@@ -17,15 +17,9 @@
[ServiceWorkerContainer interface: existence and properties of interface object]
expected: FAIL
[ServiceWorker interface object length]
expected: FAIL
[ServiceWorkerContainer interface: navigator.serviceWorker must inherit property "onmessageerror" with the proper type]
expected: FAIL
[ServiceWorker interface: attribute state]
expected: FAIL
[ServiceWorkerContainer interface: operation getRegistrations()]
expected: FAIL
@@ -41,15 +35,6 @@
[ServiceWorkerContainer interface: existence and properties of interface prototype object's @@unscopables property]
expected: FAIL
[ServiceWorker interface: existence and properties of interface prototype object's "constructor" property]
expected: FAIL
[ServiceWorker interface: attribute onstatechange]
expected: FAIL
[ServiceWorker interface: existence and properties of interface object]
expected: FAIL
[ServiceWorkerContainer interface: calling getRegistration(optional USVString) on navigator.serviceWorker with too few arguments must throw TypeError]
expected: FAIL
@@ -74,24 +59,12 @@
[ServiceWorkerContainer interface: attribute oncontrollerchange]
expected: FAIL
[ServiceWorker interface: operation postMessage(any, sequence<object>)]
expected: FAIL
[ServiceWorkerContainer interface: attribute controller]
expected: FAIL
[ServiceWorkerContainer interface: navigator.serviceWorker must inherit property "onmessage" with the proper type]
expected: FAIL
[ServiceWorker interface: existence and properties of interface prototype object's @@unscopables property]
expected: FAIL
[ServiceWorker interface: attribute scriptURL]
expected: FAIL
[ServiceWorker interface: existence and properties of interface prototype object]
expected: FAIL
[ServiceWorkerContainer must be primary interface of navigator.serviceWorker]
expected: FAIL
@@ -104,87 +77,6 @@
[ServiceWorkerContainer interface: navigator.serviceWorker must inherit property "getRegistrations()" with the proper type]
expected: FAIL
[ServiceWorker interface object name]
expected: FAIL
[ServiceWorker interface: operation postMessage(any, optional StructuredSerializeOptions)]
expected: FAIL
[ServiceWorkerRegistration interface: existence and properties of interface object]
expected: FAIL
[ServiceWorkerRegistration interface object length]
expected: FAIL
[ServiceWorkerRegistration interface object name]
expected: FAIL
[ServiceWorkerRegistration interface: existence and properties of interface prototype object]
expected: FAIL
[ServiceWorkerRegistration interface: existence and properties of interface prototype object's "constructor" property]
expected: FAIL
[ServiceWorkerRegistration interface: existence and properties of interface prototype object's @@unscopables property]
expected: FAIL
[ServiceWorkerRegistration interface: attribute installing]
expected: FAIL
[ServiceWorkerRegistration interface: attribute waiting]
expected: FAIL
[ServiceWorkerRegistration interface: attribute active]
expected: FAIL
[ServiceWorkerRegistration interface: attribute navigationPreload]
expected: FAIL
[ServiceWorkerRegistration interface: attribute scope]
expected: FAIL
[ServiceWorkerRegistration interface: attribute updateViaCache]
expected: FAIL
[ServiceWorkerRegistration interface: operation update()]
expected: FAIL
[ServiceWorkerRegistration interface: operation unregister()]
expected: FAIL
[ServiceWorkerRegistration interface: attribute onupdatefound]
expected: FAIL
[NavigationPreloadManager interface: existence and properties of interface object]
expected: FAIL
[NavigationPreloadManager interface object length]
expected: FAIL
[NavigationPreloadManager interface object name]
expected: FAIL
[NavigationPreloadManager interface: existence and properties of interface prototype object]
expected: FAIL
[NavigationPreloadManager interface: existence and properties of interface prototype object's "constructor" property]
expected: FAIL
[NavigationPreloadManager interface: existence and properties of interface prototype object's @@unscopables property]
expected: FAIL
[NavigationPreloadManager interface: operation enable()]
expected: FAIL
[NavigationPreloadManager interface: operation disable()]
expected: FAIL
[NavigationPreloadManager interface: operation setHeaderValue(ByteString)]
expected: FAIL
[NavigationPreloadManager interface: operation getState()]
expected: FAIL
[ServiceWorkerContainer interface: operation register((TrustedScriptURL or USVString), optional RegistrationOptions)]
expected: FAIL
@@ -214,15 +106,9 @@
[ServiceWorkerContainer interface: existence and properties of interface object]
expected: FAIL
[ServiceWorker interface object length]
expected: FAIL
[ServiceWorkerContainer interface: navigator.serviceWorker must inherit property "onmessageerror" with the proper type]
expected: FAIL
[ServiceWorker interface: attribute state]
expected: FAIL
[ServiceWorkerContainer interface: operation getRegistrations()]
expected: FAIL
@@ -238,15 +124,6 @@
[ServiceWorkerContainer interface: existence and properties of interface prototype object's @@unscopables property]
expected: FAIL
[ServiceWorker interface: existence and properties of interface prototype object's "constructor" property]
expected: FAIL
[ServiceWorker interface: attribute onstatechange]
expected: FAIL
[ServiceWorker interface: existence and properties of interface object]
expected: FAIL
[ServiceWorkerContainer interface: calling getRegistration(optional USVString) on navigator.serviceWorker with too few arguments must throw TypeError]
expected: FAIL
@@ -271,24 +148,12 @@
[ServiceWorkerContainer interface: attribute oncontrollerchange]
expected: FAIL
[ServiceWorker interface: operation postMessage(any, sequence<object>)]
expected: FAIL
[ServiceWorkerContainer interface: attribute controller]
expected: FAIL
[ServiceWorkerContainer interface: navigator.serviceWorker must inherit property "onmessage" with the proper type]
expected: FAIL
[ServiceWorker interface: existence and properties of interface prototype object's @@unscopables property]
expected: FAIL
[ServiceWorker interface: attribute scriptURL]
expected: FAIL
[ServiceWorker interface: existence and properties of interface prototype object]
expected: FAIL
[ServiceWorkerContainer must be primary interface of navigator.serviceWorker]
expected: FAIL
@@ -301,87 +166,6 @@
[ServiceWorkerContainer interface: navigator.serviceWorker must inherit property "getRegistrations()" with the proper type]
expected: FAIL
[ServiceWorker interface object name]
expected: FAIL
[ServiceWorker interface: operation postMessage(any, optional StructuredSerializeOptions)]
expected: FAIL
[ServiceWorkerRegistration interface: existence and properties of interface object]
expected: FAIL
[ServiceWorkerRegistration interface object length]
expected: FAIL
[ServiceWorkerRegistration interface object name]
expected: FAIL
[ServiceWorkerRegistration interface: existence and properties of interface prototype object]
expected: FAIL
[ServiceWorkerRegistration interface: existence and properties of interface prototype object's "constructor" property]
expected: FAIL
[ServiceWorkerRegistration interface: existence and properties of interface prototype object's @@unscopables property]
expected: FAIL
[ServiceWorkerRegistration interface: attribute installing]
expected: FAIL
[ServiceWorkerRegistration interface: attribute waiting]
expected: FAIL
[ServiceWorkerRegistration interface: attribute active]
expected: FAIL
[ServiceWorkerRegistration interface: attribute navigationPreload]
expected: FAIL
[ServiceWorkerRegistration interface: attribute scope]
expected: FAIL
[ServiceWorkerRegistration interface: attribute updateViaCache]
expected: FAIL
[ServiceWorkerRegistration interface: operation update()]
expected: FAIL
[ServiceWorkerRegistration interface: operation unregister()]
expected: FAIL
[ServiceWorkerRegistration interface: attribute onupdatefound]
expected: FAIL
[NavigationPreloadManager interface: existence and properties of interface object]
expected: FAIL
[NavigationPreloadManager interface object length]
expected: FAIL
[NavigationPreloadManager interface object name]
expected: FAIL
[NavigationPreloadManager interface: existence and properties of interface prototype object]
expected: FAIL
[NavigationPreloadManager interface: existence and properties of interface prototype object's "constructor" property]
expected: FAIL
[NavigationPreloadManager interface: existence and properties of interface prototype object's @@unscopables property]
expected: FAIL
[NavigationPreloadManager interface: operation enable()]
expected: FAIL
[NavigationPreloadManager interface: operation disable()]
expected: FAIL
[NavigationPreloadManager interface: operation setHeaderValue(ByteString)]
expected: FAIL
[NavigationPreloadManager interface: operation getState()]
expected: FAIL
[ServiceWorkerContainer interface: operation register((TrustedScriptURL or USVString), optional RegistrationOptions)]
expected: FAIL

View File

@@ -1,8 +0,0 @@
[postmessage.https.html]
expected: TIMEOUT
[Post loopback messages]
expected: TIMEOUT
[Post messages among service workers]
expected: NOTRUN

View File

@@ -1,2 +0,0 @@
[postmessage.https.html]
max-asserts: 2

View File

@@ -2,5 +2,7 @@
expected:
if (os == "android") and not fission and debug and not swgl: [OK, TIMEOUT]
if (os == "android") and fission: [OK, TIMEOUT]
# Bug 1926641 tracks removing the allowed failure once we no longer have an
# IPC race.
[Test skipWaiting when a installed worker is waiting]
expected: FAIL
expected: [PASS, FAIL]