Closed Bug 1793077 Opened 2 years ago Closed 2 years ago

[wpt-sync] Sync PR 36168 - WPT: Verify document.open do not mutate sandbox.

Categories

(Core :: DOM: Core & HTML, task, P4)

task

Tracking

()

RESOLVED FIXED
108 Branch
Tracking Status
firefox108 --- fixed

People

(Reporter: wpt-sync, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

Sync web-platform-tests PR 36168 into mozilla-central (this bug is closed when the sync is complete).

PR: https://github.com/web-platform-tests/wpt/pull/36168
Details from upstream follow.

Arthur Sonzogni <arthursonzogni@chromium.org> wrote:

WPT: Verify document.open do not mutate sandbox.

Current status:

  • Chrome: FAIL
  • Firefox: PASS
  • Safari: PASS

Chrome implements an unspecified behavior. When a window calls
document.open() on another window, its sandbox flags are combined with
the entered window to make stricter one.

This is bad at many level, because it means sandbox flags are no more an
"immutable" property of the window. There many immutable derived
properties like the origin, the URLLoader, the process, the
document.domain setter existence, ...

Allowing sandbox flags to be updated lead to an inconsistent state.
Moreover, the browser process is currently not notified of the update.
This lead to potential bugs.

Adding tests is the first step before removing the feature.

Bug: 1186311
Bug: 1360795
Change-Id: I1ecbf3ef6ec499a1c37fb34ac7bb982aa9b26048
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3928265
Auto-Submit: Arthur Sonzogni \<arthursonzogni@chromium.org>
Commit-Queue: Domenic Denicola \<domenic@chromium.org>
Reviewed-by: Domenic Denicola \<domenic@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1053476}

Component: web-platform-tests → DOM: Core & HTML
Product: Testing → Core
Whiteboard: [wptsync downstream] → [wptsync downstream error]

CI Results

Ran 10 Firefox configurations based on mozilla-central, and Firefox, Chrome, and Safari on GitHub CI

Total 1 tests and 1 subtests

Status Summary

Firefox

OK : 1
PASS: 1

Chrome

OK : 1
FAIL: 1

Safari

OK : 1
PASS: 1

Links

Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base

Whiteboard: [wptsync downstream error] → [wptsync downstream]
Pushed by wptsync@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/9a3cc5d89a2b [wpt PR 36168] - WPT: Verify document.open do not mutate sandbox., a=testonly
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 108 Branch
You need to log in before you can comment on or make changes to this bug.