Closed Bug 1884856 Opened 2 years ago Closed 2 years ago

[wpt-sync] Sync PR 45023 - Fix sandbox top navigation tests using external URLs.

Categories

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

task

Tracking

()

RESOLVED FIXED
125 Branch
Tracking Status
firefox125 --- fixed

People

(Reporter: wpt-sync, Unassigned)

References

(Blocks 1 open bug, )

Details

(Whiteboard: [wptsync downstream])

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

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

Liam Brady <lbrady@google.com> wrote:

Fix sandbox top navigation tests using external URLs.

The sandbox top navigation WPTs currently attempt a top-level navigation
to 'https://google.com'. Not only is using external URLs bad practice,
Firefox's test harness code refuses to make requests to remote URLs.
This causes these tests to crash in their trybots.

This CL updates the tests to point to the WPT-supported URL
'http://{{hosts[alt][www2]}}:{{ports[http][0]}}'. This is chosen so the
URL will be cross-site to the URLs the main page and the iframes will
be navigated to in the various tests.

See this comment on the WPT GitHub repo:
https://github.com/web-platform-tests/wpt/pull/35697#issuecomment-1970026245

Change-Id: I8b893d5c61c91d76acf15e47c4fe42c28a09cca5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5357673
Reviewed-by: Garrett Tanzer \<gtanzer@chromium.org>
Commit-Queue: Liam Brady \<lbrady@google.com>
Cr-Commit-Position: refs/heads/main@{#1270985}

PR 45023 applied with additional changes from upstream: 92cd57ebc8bf216199fa9a8a9225e978a2197371
Component: web-platform-tests → DOM: Core & HTML
Product: Testing → Core

CI Results

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

Total 6 tests and 2 subtests

Status Summary

Firefox

OK : 1[Gecko-android-em-7.0-x86_64-lite-qr-opt-geckoview, Gecko-android-em-7.0-x86_64-qr-debug-geckoview, Gecko-android-em-7.0-x86_64-qr-opt-geckoview, Gecko-linux1804-64-qr-debug, Gecko-linux1804-64-qr-opt, Gecko-windows11-32-2009-qr-debug, Gecko-windows11-32-2009-qr-opt, Gecko-windows11-64-2009-qr-debug, Gecko-windows11-64-2009-qr-opt] 3[GitHub]
PASS : 1[Gecko-android-em-7.0-x86_64-lite-qr-opt-geckoview, Gecko-android-em-7.0-x86_64-qr-debug-geckoview, Gecko-android-em-7.0-x86_64-qr-opt-geckoview, Gecko-linux1804-64-qr-debug, Gecko-linux1804-64-qr-opt, Gecko-windows11-32-2009-qr-debug, Gecko-windows11-32-2009-qr-opt, Gecko-windows11-64-2009-qr-debug, Gecko-windows11-64-2009-qr-opt] 12[GitHub]
FAIL : 1[Gecko-android-em-7.0-x86_64-lite-qr-opt-geckoview, Gecko-android-em-7.0-x86_64-qr-debug-geckoview, Gecko-android-em-7.0-x86_64-qr-opt-geckoview, Gecko-linux1804-64-qr-debug, Gecko-linux1804-64-qr-opt, Gecko-windows11-32-2009-qr-debug, Gecko-windows11-32-2009-qr-opt, Gecko-windows11-64-2009-qr-debug, Gecko-windows11-64-2009-qr-opt] 3[GitHub]
TIMEOUT: 6
NOTRUN : 3

Chrome

OK : 4
PASS : 16
TIMEOUT: 4
NOTRUN : 3

Safari

OK : 4
PASS : 15
FAIL : 1
TIMEOUT: 4
NOTRUN : 3

Links

Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base

Details

Firefox-only Failures

New Tests That Don't Pass

  • /html/semantics/embedded-content/the-iframe-element/sandbox-top-navigation-child.tentative.sub.window.html [wpt.fyi]: OK [GitHub], SKIP [Gecko-android-em-7.0-x86_64-lite-qr-opt-geckoview, Gecko-android-em-7.0-x86_64-qr-debug-geckoview, Gecko-android-em-7.0-x86_64-qr-opt-geckoview, Gecko-linux1804-64-qr-debug, Gecko-linux1804-64-qr-opt, Gecko-windows11-32-2009-qr-debug, Gecko-windows11-32-2009-qr-opt, Gecko-windows11-64-2009-qr-debug, Gecko-windows11-64-2009-qr-opt] (Chrome: OK, Safari: OK)
  • /html/semantics/embedded-content/the-iframe-element/sandbox-top-navigation-cross-site.tentative.sub.window.html [wpt.fyi]: SKIP [Gecko-android-em-7.0-x86_64-lite-qr-opt-geckoview, Gecko-android-em-7.0-x86_64-qr-debug-geckoview, Gecko-android-em-7.0-x86_64-qr-opt-geckoview, Gecko-linux1804-64-qr-debug, Gecko-linux1804-64-qr-opt, Gecko-windows11-32-2009-qr-debug, Gecko-windows11-32-2009-qr-opt, Gecko-windows11-64-2009-qr-debug, Gecko-windows11-64-2009-qr-opt], TIMEOUT [GitHub] (Chrome: TIMEOUT, Safari: TIMEOUT)
    • A cross-site unsandboxed iframe navigation consumes user activation and disallows top-level navigation.: TIMEOUT (Chrome: TIMEOUT, Safari: TIMEOUT)
    • A same-site unsandboxed iframe navigation does not consume user activation and allows top-level navigation.: NOTRUN (Chrome: NOTRUN, Safari: NOTRUN)
    • A same-site unsandboxed iframe navigation without sticky user activation does not allow top-level navigation.: NOTRUN (Chrome: NOTRUN, Safari: NOTRUN)
  • /html/semantics/embedded-content/the-iframe-element/sandbox-top-navigation-escalate-privileges.tentative.sub.window.html [wpt.fyi]: SKIP [Gecko-android-em-7.0-x86_64-lite-qr-opt-geckoview, Gecko-android-em-7.0-x86_64-qr-debug-geckoview, Gecko-android-em-7.0-x86_64-qr-opt-geckoview, Gecko-linux1804-64-qr-debug, Gecko-linux1804-64-qr-opt, Gecko-windows11-32-2009-qr-debug, Gecko-windows11-32-2009-qr-opt, Gecko-windows11-64-2009-qr-debug, Gecko-windows11-64-2009-qr-opt], TIMEOUT [GitHub] (Chrome: OK, Safari: OK)
    • A cross origin unsandboxed frame can't escalate privileges in a child frame: FAIL (Chrome: PASS, Safari: PASS)
    • A sandboxed same-origin grandchild without allow-same-origin can't escalate its own top-nav privileges: FAIL (Chrome: PASS, Safari: PASS)
    • A sandboxed same-origin grandchild with allow-same-origin can give itself top-nav privileges: TIMEOUT (Chrome: PASS, Safari: PASS)
  • /html/semantics/embedded-content/the-iframe-element/sandbox-top-navigation-grandchild.tentative.sub.window.html [wpt.fyi]: OK [GitHub], SKIP [Gecko-android-em-7.0-x86_64-lite-qr-opt-geckoview, Gecko-android-em-7.0-x86_64-qr-debug-geckoview, Gecko-android-em-7.0-x86_64-qr-opt-geckoview, Gecko-linux1804-64-qr-debug, Gecko-linux1804-64-qr-opt, Gecko-windows11-32-2009-qr-debug, Gecko-windows11-32-2009-qr-opt, Gecko-windows11-64-2009-qr-debug, Gecko-windows11-64-2009-qr-opt] (Chrome: OK, Safari: OK)
  • /html/semantics/embedded-content/the-iframe-element/sandbox-top-navigation-user-activation.tentative.sub.window.html [wpt.fyi]: SKIP [Gecko-android-em-7.0-x86_64-lite-qr-opt-geckoview, Gecko-android-em-7.0-x86_64-qr-debug-geckoview, Gecko-android-em-7.0-x86_64-qr-opt-geckoview, Gecko-linux1804-64-qr-debug, Gecko-linux1804-64-qr-opt, Gecko-windows11-32-2009-qr-debug, Gecko-windows11-32-2009-qr-opt, Gecko-windows11-64-2009-qr-debug, Gecko-windows11-64-2009-qr-opt], TIMEOUT [GitHub] (Chrome: TIMEOUT, Safari: TIMEOUT)
    • Allow top with user activation + user activation: TIMEOUT (Chrome: TIMEOUT, Safari: TIMEOUT)
    • allow-top-navigation-by-user-activation set but no sticky activation: NOTRUN (Chrome: NOTRUN, Safari: NOTRUN)
  • /html/semantics/embedded-content/the-iframe-element/sandbox-top-navigation-child-cross-origin.tentative.sub.window.html [wpt.fyi]
    • A cross-origin frame with delivered sandbox flags can not navigate top: FAIL (Chrome: PASS, Safari: PASS)

Tests Disabled in Gecko Infrastructure

Pushed by wptsync@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/c8814102995f [wpt PR 45023] - Fix sandbox top navigation tests using external URLs., a=testonly https://hg.mozilla.org/integration/autoland/rev/a8ba47770e91 [wpt PR 45023] - Update wpt metadata, a=testonly
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 125 Branch
You need to log in before you can comment on or make changes to this bug.