diff --git a/browser/base/content/test/alerts/browser_notification_close.js b/browser/base/content/test/alerts/browser_notification_close.js index e1d358c386a4..b687f593b273 100644 --- a/browser/base/content/test/alerts/browser_notification_close.js +++ b/browser/base/content/test/alerts/browser_notification_close.js @@ -59,7 +59,7 @@ let notificationURL = " -http +https : / / diff --git a/browser/base/content/test/alerts/browser_notification_do_not_disturb.js b/browser/base/content/test/alerts/browser_notification_do_not_disturb.js index 50642c9f0ab3..8961e75470d9 100644 --- a/browser/base/content/test/alerts/browser_notification_do_not_disturb.js +++ b/browser/base/content/test/alerts/browser_notification_do_not_disturb.js @@ -39,7 +39,7 @@ const PAGE = " -http +https : / / diff --git a/browser/base/content/test/alerts/browser_notification_open_settings.js b/browser/base/content/test/alerts/browser_notification_open_settings.js index e2f3a94277b7..96ee4585330e 100644 --- a/browser/base/content/test/alerts/browser_notification_open_settings.js +++ b/browser/base/content/test/alerts/browser_notification_open_settings.js @@ -7,7 +7,7 @@ var notificationURL = " -http +https : / / diff --git a/browser/base/content/test/alerts/browser_notification_remove_permission.js b/browser/base/content/test/alerts/browser_notification_remove_permission.js index 611471a38d3c..91d71c2b22d5 100644 --- a/browser/base/content/test/alerts/browser_notification_remove_permission.js +++ b/browser/base/content/test/alerts/browser_notification_remove_permission.js @@ -36,7 +36,7 @@ var notificationURL = " -http +https : / / diff --git a/browser/base/content/test/alerts/browser_notification_tab_switching.js b/browser/base/content/test/alerts/browser_notification_tab_switching.js index 0dae94467900..f4f9a5436faf 100644 --- a/browser/base/content/test/alerts/browser_notification_tab_switching.js +++ b/browser/base/content/test/alerts/browser_notification_tab_switching.js @@ -39,7 +39,7 @@ var notificationURL = " -http +https : / / diff --git a/dom/notification/Notification.cpp b/dom/notification/Notification.cpp index aad5ba07f73f..a5af1f68c671 100644 --- a/dom/notification/Notification.cpp +++ b/dom/notification/Notification.cpp @@ -82,15 +82,6 @@ include " mozilla / -Preferences -. -h -" -# -include -" -mozilla -/ StaticPrefs_dom . h @@ -259,6 +250,13 @@ h # include " +NotificationUtils +. +h +" +# +include +" nsComponentManagerUtils . h @@ -402,6 +400,10 @@ mozilla : dom { +using +namespace +notification +; struct NotificationStrings { @@ -1111,6 +1113,9 @@ NotificationPermissionRequest nsIPrincipal * aPrincipal +nsIPrincipal +* +aEffectiveStoragePrincipal nsPIDOMWindowInner * aWindow @@ -1137,6 +1142,10 @@ notification " _ns ) +mEffectiveStoragePrincipal +( +aEffectiveStoragePrincipal +) mPermission ( NotificationPermission @@ -1201,6 +1210,12 @@ DispatchResolvePromise ( ) ; +nsCOMPtr +< +nsIPrincipal +> +mEffectiveStoragePrincipal +; NotificationPermission mPermission ; @@ -1285,9 +1300,6 @@ final public WorkerMainThreadRunnable { -NotificationPermission -mPermission -; public : explicit @@ -1296,6 +1308,10 @@ GetPermissionRunnable WorkerPrivate * aWorker +bool +aUseRegularPrincipal +PermissionCheckPurpose +aPurpose ) : WorkerMainThreadRunnable @@ -1310,12 +1326,13 @@ Permission " _ns ) -mPermission +mUseRegularPrincipal ( -NotificationPermission -: -: -Denied +aUseRegularPrincipal +) +mPurpose +( +aPurpose ) { } @@ -1325,33 +1342,61 @@ MainThreadRun ) override { -ErrorResult -result -; MOZ_ASSERT ( mWorkerRef ) ; -mPermission +WorkerPrivate +* +workerPrivate = -Notification -: -: -GetPermissionInternal -( mWorkerRef - > Private ( ) +; +nsIPrincipal +* +principal += +workerPrivate - > GetPrincipal ( ) -result +; +nsIPrincipal +* +effectiveStoragePrincipal += +mUseRegularPrincipal +? +principal +: +workerPrivate +- +> +GetPartitionedPrincipal +( +) +; +mPermission += +GetNotificationPermission +( +principal +effectiveStoragePrincipal +workerPrivate +- +> +IsSecureContext +( +) +mPurpose ) ; return @@ -1367,6 +1412,22 @@ return mPermission ; } +private +: +NotificationPermission +mPermission += +NotificationPermission +: +: +Denied +; +bool +mUseRegularPrincipal +; +PermissionCheckPurpose +mPurpose +; } ; class @@ -2138,51 +2199,11 @@ Run ( ) { -bool -isSystem -= -mPrincipal -- -> -IsSystemPrincipal -( -) -; -bool -blocked -= -false -; if ( -isSystem -) -{ -mPermission -= -NotificationPermission -: -: -Granted -; -} -else -if +IsNotificationAllowedFor ( mPrincipal -- -> -GetIsInPrivateBrowsing -( -) -& -& -! -StaticPrefs -: -: -dom_webnotifications_privateBrowsing_enabled -( ) ) { @@ -2191,47 +2212,34 @@ mPermission NotificationPermission : : -Denied -; -blocked -= -true +Granted ; } else -{ if ( +IsNotificationForbiddenFor +( mPrincipal +mEffectiveStoragePrincipal +mWindow - > -SchemeIs +IsSecureContext ( -" -file -" -) ) -{ -mPermission -= -NotificationPermission +PermissionCheckPurpose : : -Granted -; -} -else -if -( -! +PermissionRequest mWindow - > -IsSecureContext +GetExtantDoc ( ) ) +) { mPermission = @@ -2240,53 +2248,6 @@ NotificationPermission : Denied ; -blocked -= -true -; -nsCOMPtr -< -Document -> -doc -= -mWindow -- -> -GetExtantDoc -( -) -; -if -( -doc -) -{ -nsContentUtils -: -: -ReportToConsole -( -nsIScriptError -: -: -errorFlag -" -DOM -" -_ns -doc -nsContentUtils -: -: -eDOM_PROPERTIES -" -NotificationsInsecureRequestIsForbidden -" -) -; -} -} } PromptResult pr @@ -2383,31 +2344,38 @@ eNotificationsRequireUserGestureDeprecation } if ( +mPermission ! -isSystem -& -& -! -blocked -& -& -! -StaticPrefs += +NotificationPermission : : -dom_webnotifications_allowcrossoriginiframe +Default +) +{ +return +DispatchResolvePromise ( ) -& -& -! -mPrincipal -- -> -Subsumes +; +} +return +nsContentPermissionUtils +: +: +AskPermission ( -mTopLevelPrincipal +this +mWindow ) +; +} +NS_IMETHODIMP +NotificationPermissionRequest +: +: +Cancel +( ) { mPermission @@ -2415,100 +2383,10 @@ mPermission NotificationPermission : : -Denied -; -blocked -= -true +Default ; -nsCOMPtr -< -Document -> -doc -= -mWindow -- -> -GetExtantDoc -( -) -; -if -( -doc -) -{ -nsContentUtils -: -: -ReportToConsole -( -nsIScriptError -: -: -errorFlag -" -DOM -" -_ns -doc -nsContentUtils -: -: -eDOM_PROPERTIES -" -NotificationsCrossOriginIframeRequestIsForbidden -" -) -; -} -} -if -( -mPermission -! -= -NotificationPermission -: -: -Default -) -{ -return -DispatchResolvePromise -( -) -; -} -return -nsContentPermissionUtils -: -: -AskPermission -( -this -mWindow -) -; -} -NS_IMETHODIMP -NotificationPermissionRequest -: -: -Cancel -( -) -{ -mPermission -= -NotificationPermission -: -: -Default -; -return -DispatchResolvePromise +return +DispatchResolvePromise ( ) ; @@ -2692,10 +2570,7 @@ NotificationsRequireUserGesture } mPermission = -Notification -: -: -TestPermission +GetRawNotificationPermission ( mPrincipal ) @@ -3169,6 +3044,15 @@ MOZ_ASSERT mWorkerPrivate ) ; +mWorkerUseRegularPrincipal += +mWorkerPrivate +- +> +UseRegularPrincipal +( +) +; } } nsresult @@ -6246,17 +6130,48 @@ if mWorkerPrivate ) { +nsIPrincipal +* +principal += +mWorkerPrivate +- +> +GetPrincipal +( +) +; +nsIPrincipal +* +effectiveStoragePrincipal += +mWorkerUseRegularPrincipal +? +principal +: +mWorkerPrivate +- +> +GetPartitionedPrincipal +( +) +; permission = -GetPermissionInternal +GetNotificationPermission ( +principal +effectiveStoragePrincipal mWorkerPrivate - > -GetPrincipal +IsSecureContext ( ) -result +PermissionCheckPurpose +: +: +NotificationShow ) ; } @@ -6269,6 +6184,10 @@ GetPermissionInternal GetOwnerWindow ( ) +PermissionCheckPurpose +: +: +NotificationShow result ) ; @@ -6900,10 +6819,27 @@ GetPrincipal ( ) ; +nsCOMPtr +< +nsIPrincipal +> +effectiveStoragePrincipal += +sop +- +> +GetEffectiveStoragePrincipal +( +) +; if ( ! principal +| +| +! +effectiveStoragePrincipal ) { aRv @@ -6985,6 +6921,7 @@ new NotificationPermissionRequest ( principal +effectiveStoragePrincipal window promise permissionCallback @@ -7025,315 +6962,34 @@ const GlobalObject & aGlobal -ErrorResult -& -aRv -) -{ -nsCOMPtr -< -nsIGlobalObject -> -global -= -do_QueryInterface -( -aGlobal -. -GetAsSupports -( -) -) -; -return -GetPermission -( -global -aRv -) -; -} -NotificationPermission -Notification -: -: -GetPermission -( -nsIGlobalObject -* -aGlobal -ErrorResult -& -aRv -) -{ -if -( -NS_IsMainThread -( -) -) -{ -return -GetPermissionInternal -( -aGlobal -- -> -GetAsInnerWindow -( -) -aRv -) -; -} -else -{ -WorkerPrivate -* -worker -= -GetCurrentThreadWorkerPrivate -( -) -; -MOZ_ASSERT -( -worker -) -; -RefPtr -< -GetPermissionRunnable -> -r -= -new -GetPermissionRunnable -( -worker -) -; -r -- -> -Dispatch -( -worker -Canceling -aRv -) -; -if -( -aRv -. -Failed -( -) -) -{ -return -NotificationPermission -: -: -Denied -; -} -return -r -- -> -GetPermission -( -) -; -} -} -NotificationPermission -Notification -: -: -GetPermissionInternal -( -nsPIDOMWindowInner -* -aWindow -ErrorResult -& -aRv -) -{ -nsCOMPtr -< -nsIScriptObjectPrincipal -> -sop -= -do_QueryInterface -( -aWindow -) -; -if -( -! -sop -) -{ -aRv -. -Throw -( -NS_ERROR_UNEXPECTED -) -; -return -NotificationPermission -: -: -Denied -; -} -nsCOMPtr -< -nsIPrincipal -> -principal -= -sop -- -> -GetPrincipal -( -) -; -if -( -! -principal -) -{ -aRv -. -Throw -( -NS_ERROR_UNEXPECTED -) -; -return -NotificationPermission -: -: -Denied -; -} -if -( -principal -- -> -GetIsInPrivateBrowsing -( -) -& -& -! -StaticPrefs -: -: -dom_webnotifications_privateBrowsing_enabled -( -) -) -{ -return -NotificationPermission -: -: -Denied -; -} -if -( -! -StaticPrefs -: -: -dom_webnotifications_allowcrossoriginiframe -( -) +ErrorResult +& +aRv ) { nsCOMPtr < -nsIScriptObjectPrincipal +nsIGlobalObject > -topSop +global = do_QueryInterface ( -aWindow -- -> -GetBrowsingContext -( -) -- -> -Top -( -) -- -> -GetDOMWindow +aGlobal +. +GetAsSupports ( ) ) ; -nsIPrincipal -* -topPrincipal -= -topSop -? -topSop -- -> -GetPrincipal -( -) -: -nullptr -; -if -( -! -topPrincipal -| -| -! -principal -- -> -Subsumes -( -topPrincipal -) -) -{ return -NotificationPermission +GetPermission +( +global +PermissionCheckPurpose : : -Denied -; -} -} -return -GetPermissionInternal -( -principal +PermissionAttribute aRv ) ; @@ -7342,54 +6998,87 @@ NotificationPermission Notification : : -GetPermissionInternal +GetPermission ( -nsIPrincipal +nsIGlobalObject * -aPrincipal +aGlobal +PermissionCheckPurpose +aPurpose ErrorResult & aRv ) { -AssertIsOnMainThread +if +( +NS_IsMainThread +( +) +) +{ +return +GetPermissionInternal +( +aGlobal +- +> +GetAsInnerWindow +( +) +aPurpose +aRv +) +; +} +WorkerPrivate +* +worker += +GetCurrentThreadWorkerPrivate ( ) ; MOZ_ASSERT ( -aPrincipal +worker ) ; -if +RefPtr +< +GetPermissionRunnable +> +r += +new +GetPermissionRunnable ( -aPrincipal +worker +worker - > -IsSystemPrincipal +UseRegularPrincipal ( ) +aPurpose ) -{ -return -NotificationPermission -: -: -Granted ; -} -else -{ -if -( -aPrincipal +r - > -SchemeIs +Dispatch +( +worker +Canceling +aRv +) +; +if +( +aRv +. +Failed ( -" -file -" ) ) { @@ -7397,14 +7086,15 @@ return NotificationPermission : : -Granted +Denied ; } -} return -TestPermission +r +- +> +GetPermission ( -aPrincipal ) ; } @@ -7412,109 +7102,114 @@ NotificationPermission Notification : : -TestPermission +GetPermissionInternal ( -nsIPrincipal +nsPIDOMWindowInner * -aPrincipal +aWindow +PermissionCheckPurpose +aPurpose +ErrorResult +& +aRv ) { -AssertIsOnMainThread -( -) -; -uint32_t -permission -= -nsIPermissionManager -: -: -UNKNOWN_ACTION -; nsCOMPtr < -nsIPermissionManager +nsIScriptObjectPrincipal > -permissionManager +sop = -components -: -: -PermissionManager -: -: -Service +do_QueryInterface ( +aWindow ) ; if ( ! -permissionManager +sop ) { +aRv +. +Throw +( +NS_ERROR_UNEXPECTED +) +; return NotificationPermission : : -Default +Denied ; } -permissionManager +nsCOMPtr +< +nsIPrincipal +> +principal += +sop - > -TestExactPermissionFromPrincipal +GetPrincipal ( -aPrincipal -" -desktop +) +; +nsCOMPtr +< +nsIPrincipal +> +effectiveStoragePrincipal += +sop - -notification -" -_ns -& -permission +> +GetEffectiveStoragePrincipal +( ) ; -switch +if ( -permission +! +principal +| +| +! +effectiveStoragePrincipal ) { -case -nsIPermissionManager -: -: -ALLOW_ACTION -: -return -NotificationPermission -: -: -Granted +aRv +. +Throw +( +NS_ERROR_UNEXPECTED +) ; -case -nsIPermissionManager -: -: -DENY_ACTION -: return NotificationPermission : : Denied ; -default -: +} return -NotificationPermission -: -: -Default +GetNotificationPermission +( +principal +effectiveStoragePrincipal +aWindow +- +> +IsSecureContext +( +) +aPurpose +) ; } -} nsresult Notification : @@ -10353,6 +10048,10 @@ permission GetPermission ( aGlobal +PermissionCheckPurpose +: +: +NotificationShow aRv ) ; diff --git a/dom/notification/Notification.h b/dom/notification/Notification.h index f3a10b8d30bf..cf7279f0980b 100644 --- a/dom/notification/Notification.h +++ b/dom/notification/Notification.h @@ -118,6 +118,16 @@ Promise class StrongWorkerRef ; +namespace +notification +{ +enum +class +PermissionCheckPurpose +: +uint8_t +; +} class Notification : @@ -642,6 +652,11 @@ WorkerPrivate > mWorkerPrivate ; +bool +mWorkerUseRegularPrincipal += +false +; WorkerNotificationObserver * mObserver @@ -669,32 +684,16 @@ GetPermission nsIGlobalObject * aGlobal +notification +: +: +PermissionCheckPurpose +aPurpose ErrorResult & aRv ) ; -static -NotificationPermission -GetPermissionInternal -( -nsIPrincipal -* -aPrincipal -ErrorResult -& -rv -) -; -static -NotificationPermission -TestPermission -( -nsIPrincipal -* -aPrincipal -) -; bool DispatchClickEvent ( @@ -853,6 +852,11 @@ GetPermissionInternal nsPIDOMWindowInner * aWindow +notification +: +: +PermissionCheckPurpose +aPurpose ErrorResult & rv diff --git a/dom/notification/NotificationUtils.cpp b/dom/notification/NotificationUtils.cpp new file mode 100644 index 000000000000..f804b2f40971 --- /dev/null +++ b/dom/notification/NotificationUtils.cpp @@ -0,0 +1,441 @@ +# +include +" +NotificationUtils +. +h +" +# +include +" +mozilla +/ +BasePrincipal +. +h +" +# +include +" +mozilla +/ +Components +. +h +" +# +include +" +mozilla +/ +StaticPrefs_dom +. +h +" +# +include +" +mozilla +/ +dom +/ +NotificationBinding +. +h +" +# +include +" +nsIPermissionManager +. +h +" +namespace +mozilla +: +: +dom +: +: +notification +{ +bool +IsNotificationAllowedFor +( +nsIPrincipal +* +aPrincipal +) +{ +if +( +aPrincipal +- +> +IsSystemPrincipal +( +) +) +{ +return +true +; +} +return +aPrincipal +- +> +SchemeIs +( +" +file +" +) +; +} +bool +IsNotificationForbiddenFor +( +nsIPrincipal +* +aPrincipal +nsIPrincipal +* +aEffectiveStoragePrincipal +bool +isSecureContext +PermissionCheckPurpose +aPurpose +Document +* +aRequestorDoc +) +{ +if +( +aPrincipal +- +> +GetIsInPrivateBrowsing +( +) +& +& +! +StaticPrefs +: +: +dom_webnotifications_privateBrowsing_enabled +( +) +) +{ +return +true +; +} +if +( +! +isSecureContext +) +{ +if +( +aRequestorDoc +) +{ +nsContentUtils +: +: +ReportToConsole +( +nsIScriptError +: +: +errorFlag +" +DOM +" +_ns +aRequestorDoc +nsContentUtils +: +: +eDOM_PROPERTIES +" +NotificationsInsecureRequestIsForbidden +" +) +; +} +return +true +; +} +const +nsString +& +partitionKey += +aEffectiveStoragePrincipal +- +> +OriginAttributesRef +( +) +. +mPartitionKey +; +if +( +aEffectiveStoragePrincipal +- +> +OriginAttributesRef +( +) +. +mPartitionKey +. +IsEmpty +( +) +) +{ +return +false +; +} +nsString +outScheme +; +nsString +outBaseDomain +; +int32_t +outPort +; +bool +outForeignByAncestorContext +; +OriginAttributes +: +: +ParsePartitionKey +( +partitionKey +outScheme +outBaseDomain +outPort +outForeignByAncestorContext +) +; +if +( +outForeignByAncestorContext +) +{ +return +false +; +} +if +( +aRequestorDoc +) +{ +nsContentUtils +: +: +ReportToConsole +( +nsIScriptError +: +: +errorFlag +" +DOM +" +_ns +aRequestorDoc +nsContentUtils +: +: +eDOM_PROPERTIES +" +NotificationsCrossOriginIframeRequestIsForbidden +" +) +; +} +return +! +StaticPrefs +: +: +dom_webnotifications_allowcrossoriginiframe +( +) +; +} +NotificationPermission +GetRawNotificationPermission +( +nsIPrincipal +* +aPrincipal +) +{ +AssertIsOnMainThread +( +) +; +uint32_t +permission += +nsIPermissionManager +: +: +UNKNOWN_ACTION +; +nsCOMPtr +< +nsIPermissionManager +> +permissionManager += +components +: +: +PermissionManager +: +: +Service +( +) +; +if +( +! +permissionManager +) +{ +return +NotificationPermission +: +: +Default +; +} +permissionManager +- +> +TestExactPermissionFromPrincipal +( +aPrincipal +" +desktop +- +notification +" +_ns +& +permission +) +; +switch +( +permission +) +{ +case +nsIPermissionManager +: +: +ALLOW_ACTION +: +return +NotificationPermission +: +: +Granted +; +case +nsIPermissionManager +: +: +DENY_ACTION +: +return +NotificationPermission +: +: +Denied +; +default +: +return +NotificationPermission +: +: +Default +; +} +} +NotificationPermission +GetNotificationPermission +( +nsIPrincipal +* +aPrincipal +nsIPrincipal +* +aEffectiveStoragePrincipal +bool +isSecureContext +PermissionCheckPurpose +aPurpose +) +{ +if +( +IsNotificationAllowedFor +( +aPrincipal +) +) +{ +return +NotificationPermission +: +: +Granted +; +} +if +( +IsNotificationForbiddenFor +( +aPrincipal +aEffectiveStoragePrincipal +isSecureContext +aPurpose +) +) +{ +return +NotificationPermission +: +: +Denied +; +} +return +GetRawNotificationPermission +( +aPrincipal +) +; +} +} diff --git a/dom/notification/NotificationUtils.h b/dom/notification/NotificationUtils.h new file mode 100644 index 000000000000..6dea46003b81 --- /dev/null +++ b/dom/notification/NotificationUtils.h @@ -0,0 +1,104 @@ +# +ifndef +DOM_NOTIFICATION_NOTIFICATIONUTILS_H_ +# +define +DOM_NOTIFICATION_NOTIFICATIONUTILS_H_ +# +include +< +cstdint +> +class +nsIPrincipal +; +namespace +mozilla +: +: +dom +{ +enum +class +NotificationPermission +: +uint8_t +; +class +Document +; +} +namespace +mozilla +: +: +dom +: +: +notification +{ +NotificationPermission +GetRawNotificationPermission +( +nsIPrincipal +* +aPrincipal +) +; +enum +class +PermissionCheckPurpose +: +uint8_t +{ +PermissionRequest +PermissionAttribute +NotificationShow +} +; +bool +IsNotificationAllowedFor +( +nsIPrincipal +* +aPrincipal +) +; +bool +IsNotificationForbiddenFor +( +nsIPrincipal +* +aPrincipal +nsIPrincipal +* +aEffectiveStoragePrincipal +bool +isSecureContext +PermissionCheckPurpose +aPurpose +Document +* +aRequestorDoc += +nullptr +) +; +NotificationPermission +GetNotificationPermission +( +nsIPrincipal +* +aPrincipal +nsIPrincipal +* +aEffectiveStoragePrincipal +bool +isSecureContext +PermissionCheckPurpose +aPurpose +) +; +} +# +endif diff --git a/dom/notification/moz.build b/dom/notification/moz.build index 3073743e4a3f..938b635e0aa2 100644 --- a/dom/notification/moz.build +++ b/dom/notification/moz.build @@ -74,6 +74,11 @@ NotificationEvent . cpp " +" +NotificationUtils +. +cpp +" ] include ( diff --git a/dom/notification/test/mochitest/mochitest.toml b/dom/notification/test/mochitest/mochitest.toml index 164d7a9c7dbe..5359267b777a 100644 --- a/dom/notification/test/mochitest/mochitest.toml +++ b/dom/notification/test/mochitest/mochitest.toml @@ -1,6 +1,11 @@ [ DEFAULT ] +scheme += +" +https +" support - files @@ -24,15 +29,6 @@ test_notification_basics html " ] -scheme -= -" -https -" -# -requestPermission -requires -HTTPS skip - if @@ -83,11 +79,6 @@ blank html " ] -scheme -= -" -https -" # This test @@ -121,6 +112,11 @@ http3 http2 " ] +scheme += +" +http +" [ " test_notification_permissions @@ -139,11 +135,6 @@ blank html " ] -scheme -= -" -https -" [ " test_notification_serviceworker_constructor_error diff --git a/dom/notification/test/mochitest/notification_openWindow_worker.js b/dom/notification/test/mochitest/notification_openWindow_worker.js index e9177ad5985c..6f62766fd21d 100644 --- a/dom/notification/test/mochitest/notification_openWindow_worker.js +++ b/dom/notification/test/mochitest/notification_openWindow_worker.js @@ -2,15 +2,13 @@ const gRoot = " -http +https : / / -mochi +example . -test -: -8888 +com / tests / diff --git a/dom/notification/test/mochitest/openWindow_worker.js b/dom/notification/test/mochitest/openWindow_worker.js index de4975665090..975779d1a3d8 100644 --- a/dom/notification/test/mochitest/openWindow_worker.js +++ b/dom/notification/test/mochitest/openWindow_worker.js @@ -614,15 +614,13 @@ var redirect = " -http +https : / / -mochi +example . -test -: -8888 +com / tests / @@ -644,13 +642,13 @@ var redirect_xorigin = " -http +https : / / example . -com +org / tests / @@ -672,15 +670,13 @@ var same_origin = " -http +https : / / -mochi +example . -test -: -8888 +com / tests / @@ -703,13 +699,13 @@ var different_origin = " -http +https : / / example . -com +org / tests / diff --git a/dom/notification/test/mochitest/open_window/client.sjs b/dom/notification/test/mochitest/open_window/client.sjs index 97fc7eb8afc7..f1d0fa166ea2 100644 --- a/dom/notification/test/mochitest/open_window/client.sjs +++ b/dom/notification/test/mochitest/open_window/client.sjs @@ -150,9 +150,9 @@ domain = = " -mochi +example . -test +com " ) { @@ -332,15 +332,13 @@ iframe src = " -http +https : / / -mochi +example . -test -: -8888 +com / tests / diff --git a/dom/notification/test/mochitest/test_notification_tag.html b/dom/notification/test/mochitest/test_notification_tag.html index fc4c0fbb2d99..15d67db0c9db 100644 --- a/dom/notification/test/mochitest/test_notification_tag.html +++ b/dom/notification/test/mochitest/test_notification_tag.html @@ -890,7 +890,7 @@ open ( " -http +https : / / @@ -899,8 +899,6 @@ example . org -: -80 / tests / @@ -926,7 +924,7 @@ open ( " -http +https : / / @@ -935,8 +933,6 @@ example . org -: -80 / tests / @@ -996,7 +992,7 @@ open ( " -http +https : / / @@ -1005,8 +1001,6 @@ example . org -: -80 / tests / diff --git a/testing/web-platform/meta/notifications/cross-origin-nested.tentative.https.sub.html.ini b/testing/web-platform/meta/notifications/cross-origin-nested.tentative.https.sub.html.ini index aaafd6fd278d..46ab42d54019 100644 --- a/testing/web-platform/meta/notifications/cross-origin-nested.tentative.https.sub.html.ini +++ b/testing/web-platform/meta/notifications/cross-origin-nested.tentative.https.sub.html.ini @@ -63,7 +63,6 @@ android ) : NOTRUN -FAIL [ nested first diff --git a/testing/web-platform/meta/notifications/permissions-non-secure.html.ini b/testing/web-platform/meta/notifications/permissions-non-secure.html.ini deleted file mode 100644 index 09944ad1242c..000000000000 --- a/testing/web-platform/meta/notifications/permissions-non-secure.html.ini +++ /dev/null @@ -1,54 +0,0 @@ -[ -permissions -- -non -- -secure -. -html -] -expected -: -if -( -os -= -= -" -android -" -) -and -debug -: -CRASH -[ -Notification -. -permission -must -be -called -from -a -secure -context -] -expected -: -FAIL -[ -Notification -. -permission -must -be -called -from -a -secure -worker -] -expected -: -FAIL