Closed Bug 1653454 Opened 4 years ago Closed 4 years ago

Fix failing DOM:Push Notifications mochitests with cross-origin and Fission enabled

Categories

(Core :: DOM: Push Subscriptions, defect, P3)

defect

Tracking

()

RESOLVED FIXED
81 Branch
Fission Milestone M6b
Tracking Status
firefox81 --- fixed

People

(Reporter: neha, Assigned: sg)

References

Details

Attachments

(1 file)

These tests are marked as skipped/failed for cross-origin and Fission, and need to be fixed
dom/push/test/test_data.html
dom/push/test/test_has_permissions.html
dom/push/test/test_multiple_register.html
dom/push/test/test_multiple_register_different_scope.html
dom/push/test/test_permissions.html
dom/push/test/test_register.html
dom/push/test/test_register_key.html
dom/push/test/test_subscription_change.html
dom/push/test/test_try_registering_offline_disabled.html
dom/push/test/test_unregister.html

https://docs.google.com/spreadsheets/d/16G5AZhHWWow3rBgim4QBHzWXMIIJiky2SzXYgDMTTKY/edit#gid=1354562828&range=29:39

More info: https://wiki.mozilla.org/Project_Fission/Enabling_Tests_with_Fission#Cross-Origin_Mochitests

Fission Milestone: --- → M6b
Severity: -- → S3
Priority: -- → P3

Jens, please assign someone to look into these failures. If the failure is because of a broken functionality with Fission enabled, then that must be fixed for M6b (Fx82) and if it is because of a broken test, then that can be done a little later but before Fission beta later this year so should be tracked separately for M7.

Flags: needinfo?(jstutte)
Flags: needinfo?(jstutte) → needinfo?(sgiesecke)

I think all of these are failing because https://searchfox.org/mozilla-central/rev/e07d5eb5646b40b10df3164e315d4a3108cf9101/dom/push/Push.jsm#63 causes a SecurityError (Permission denied to access property "document" on cross-origin object):

    this._topLevelPrincipal = win.top.document.nodePrincipal;

This issue might mask other issues, and needs to be resolved first.

I am not sure what must be done about that: Do we need to access the top-level document in a different way here? Do we need to check if we can access it and use a replacement value otherwise? Or does this legitimately fail in the cross-origin/cross-process case?

The value is only used here: https://searchfox.org/mozilla-central/rev/e07d5eb5646b40b10df3164e315d4a3108cf9101/dom/push/Push.jsm#215

FWIW, if I just set this._topLevelPrincipal to undefined, all tests pass.

Flags: needinfo?(sgiesecke)
Assignee: nobody → sgiesecke
Flags: needinfo?(nkochar)
Flags: needinfo?(nkochar) → needinfo?(afarre)
Flags: needinfo?(afarre)
Flags: needinfo?(afarre)
Status: NEW → ASSIGNED
Flags: needinfo?(afarre)
Pushed by sgiesecke@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/6e33e46560bd
Fix failing DOM:Push Notifications mochitests with cross-origin and Fission enabled. r=farre,dom-workers-and-storage-reviewers,asuth
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 81 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: