github web-platform-tests/wpt merge_pr_47878

latest releases: merge_pr_49470, epochs/three_hourly/2024-12-03_06H, epochs/six_hourly/2024-12-03_06H...
3 months ago

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}

Don't miss a new wpt release

NewReleases is sending notifications on new releases.