Closed Bug 1915756 Opened 6 months ago Closed 6 months ago

[wpt-sync] Sync PR 47878 - Refactor some sandbox top-navigation tests as browsertests.

Categories

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

task

Tracking

()

RESOLVED FIXED
131 Branch
Tracking Status
firefox131 --- fixed

People

(Reporter: wpt-sync, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

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

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

Liam Brady <lbrady@google.com> wrote:

Refactor some sandbox top-navigation tests as browsertests.

A series of tentative WPTs were written to test updates to our
framebusting interventions. Some of the tests written test non-standard
behavior, and have been resulting in failures when other browsers (who
have not implemented our framebusting interventions) try to run them.
There are also issues with some of the tests themselves when running in
headless mode, as they require giving user activation to a subframe in a
separate window the test opens, which is something headless mode doesn't
currently support. To fix both of these problems, this CL refactors the
problematic tests into browser tests.

Most of the WPTs are staying as is, since they test standard behavior
and don't have compatibility issues with headless mode.

The following tests are being refactored into browser tests:

  • sandbox-top-navigation-cross-origin-escalate
    • now FramebustingFromPrivilegeEscalationFails
  • sandbox-top-navigation-child-cross-origin-delivered
    • now FramebustingFromDeliveredFlagsFails
  • sandbox-top-navigation-cross-site
    • now FramebustingAfterCrossSiteNavigationFails
  • sandbox-top-navigation-grandchild-sandboxed-escalate
    • now FramebustingFromGrandchildPrivilegeEscalationFails
  • sandbox-top-navigation-same-site-no-activation
    • now FramebustingAfterSameSiteNavigationWithoutUserActivationFails
  • sandbox-top-navigation-same-site
    • now FramebustingAfterSameSiteNavigationSucceeds

The following tests have duplicates and are being removed altogether:

  • sandbox-top-navigation-child-frame-both
    • duplicate of iframe_sandbox_allow_top_navigation-3
  • sandbox-top-navigation-child-frame
    • duplicate of iframe_sandbox_allow_top_navigation-1
  • sandbox-top-navigation-grandchild-unsandboxed
    • duplicate of sandbox-top-navigation-grandchild-unsandboxed-cross-origin-parent
  • sandbox-top-navigation-user-activation-no-sticky
    • duplicate of iframe_sandbox_allow_top_navigation_by_user_activation_without_user_gesture
  • sandbox-top-navigation-user-activation-sticky
    • duplicate of
      iframe_sandbox_allow_top_navigation_by_user_activation-manual

The following tests rely on manual behavior and, while not being
removed, are getting an equivalent browser test:

  • iframe_sandbox_allow_top_navigation_by_user_activation_without_user_gesture
    • now FramebustingWithAllowTopNavigationByUserActivation
  • iframe_sandbox_allow_top_navigation_by_user_activation-manual
    • also now FramebustingWithAllowTopNavigationByUserActivation

Bug: 347782854
Change-Id: I3b39a9d51db3dd725c8a88eac0bb464fa4753c04
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5813532
Reviewed-by: Nasko Oskov \<nasko@chromium.org>
Commit-Queue: Liam Brady \<lbrady@google.com>
Cr-Commit-Position: refs/heads/main@{#1348945}

Component: web-platform-tests → DOM: Core & HTML
Product: Testing → Core

CI Results

Ran 0 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
PASS: 1

Safari

OK : 1
PASS: 1

Links

GitHub PR Head
GitHub PR Base

Pushed by wptsync@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/8ba8e93843d1 [wpt PR 47878] - Refactor some sandbox top-navigation tests as browsertests., a=testonly
Status: NEW → RESOLVED
Closed: 6 months ago
Resolution: --- → FIXED
Target Milestone: --- → 131 Branch
You need to log in before you can comment on or make changes to this bug.