Skip to content

script: More faithfully implement "evaluate a JavaScript URL" - #47486

Merged
mrobinson merged 2 commits into
servo:mainfrom
mrobinson:trusted-types-3
Aug 25, 2026
Merged

mrobinson merged 2 commits into
servo:mainfrom
mrobinson:trusted-types-3

Conversation

@mrobinson

@mrobinson mrobinson commented Aug 24, 2026 •

Copy link
Copy Markdown
Member

This change makes it so that the "evaluate a JavaScript URL" procedure
from the specification is more faithfully implemented. In particular, it
builds and executes a classic script, which nows grows the ability to
return a value, as specified. More specification steps are filled out in
general.

Testing: This results in a progression on a decent number of WPT subtests.

@mrobinson
mrobinson requested a review from gterzian as a code owner August 24, 2026 17:18
@servo-highfive servo-highfive added the S-awaiting-review There is new code that needs to be reviewed. label Aug 24, 2026
@mrobinson
mrobinson marked this pull request as draft August 24, 2026 17:18
@mrobinson

Copy link
Copy Markdown
Member Author

This is a draft because it depends on #47485, but otherwise it is a three line fix that is reviewable as it is.

introduction_type: Option<&'static CStr>,
rval: Option<MutableHandleValue>,
) -> Result<(), JavaScriptEvaluationError> {
assert!(self.can_run_script());

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I pushed back against this change in another PR because this check is intended to be a backstop. If we're hitting this assertion, I'd like to address the callers instead of silently ignoring the attempt to run script.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fair enough. I've taken a different approach here. Instead, I've more faithfully implemented the specification around "evaluate a JavaScript URL" which prevents evaluating a script as a side-effect of creating and running a classic script.

@mrobinson mrobinson Aug 25, 2026 •

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I realized this comment was a bit confusing. What I meant to say is I rewrote the change after your comment above.

@mrobinson
mrobinson force-pushed the trusted-types-3 branch 2 times, most recently from 3cbc1aa to 2f9548a Compare August 24, 2026 22:09
@mrobinson mrobinson added the T-linux-wpt Do a try run of the WPT label Aug 24, 2026
@github-actions github-actions Bot removed the T-linux-wpt Do a try run of the WPT label Aug 24, 2026
@mrobinson mrobinson changed the title script: Gracefully handle when evaluate_js_on_global cannot run script script: More faithfully implement "evaluate a JavaScript URL" Aug 24, 2026
@github-actions

Copy link
Copy Markdown

🔨 Triggering try run (#32783250714) for Linux (WPT)

@mrobinson

Copy link
Copy Markdown
Member Author

Let's see what the bots say about this new approach, I've kicked off a WPT job.

@github-actions

Copy link
Copy Markdown

Test results for linux-wpt from try job (#32783250714):

Flaky unexpected result (28)
  • OK /_webgl/conformance/textures/misc/texture-upload-size.html (#21770)
    • FAIL [expected PASS] subtest: WebGL test #45

      assert_true: Texture was smaller than the expected size 2x2 expected true got false
      

    • FAIL [expected PASS] subtest: WebGL test #47

      assert_true: getError expected: INVALID_VALUE. Was NO_ERROR : when calling texSubImage2D with the same texture upload with offset 1, 1 expected true got false
      

    • FAIL [expected PASS] subtest: WebGL test #49

      assert_true: Texture was smaller than the expected size 2x2 expected true got false
      

    • FAIL [expected PASS] subtest: WebGL test #51

      assert_true: getError expected: INVALID_VALUE. Was NO_ERROR : when calling texSubImage2D with the same texture upload with offset 1, 1 expected true got false
      

    • PASS [expected FAIL] subtest: WebGL test #53
    • PASS [expected FAIL] subtest: WebGL test #55
    • PASS [expected FAIL] subtest: WebGL test #57
    • PASS [expected FAIL] subtest: WebGL test #59
    • FAIL [expected PASS] subtest: WebGL test #61

      assert_true: Texture was smaller than the expected size 2x2 expected true got false
      

    • FAIL [expected PASS] subtest: WebGL test #63

      assert_true: getError expected: INVALID_VALUE. Was NO_ERROR : when calling texSubImage2D with the same texture upload with offset 1, 1 expected true got false
      

    • And 10 more unexpected results...
  • TIMEOUT [expected OK] /_webgl/conformance/uniforms/no-over-optimization-on-uniform-array-16.html
    • NOTRUN [expected PASS] subtest: Overall test
  • TIMEOUT [expected OK] /console/console-log-large-array.any.worker.html
    • TIMEOUT [expected PASS] subtest: Logging large arrays works

      Test timed out
      

  • OK /css/css-fonts/variations/at-font-face-font-matching.html (#20684)
    • FAIL [expected PASS] subtest: Matching font-weight: '399' should prefer '400' over '450 460'

      assert_equals: Unexpected font on test element expected 487 but got 532
      

    • FAIL [expected PASS] subtest: Matching font-weight: '399' should prefer '500 501' over '502 510'

      assert_equals: Unexpected font on test element expected 487 but got 532
      

  • ERROR [expected TIMEOUT] /css/css-sizing/responsive-iframe/responsive-iframe-allow-origins.html?container=subdomain,origin=cross,allowed=wildcard,expect=400 (#47268)
  • OK [expected TIMEOUT] /fetch/api/redirect/redirect-keepalive.https.any.html (#32153)
    • PASS [expected TIMEOUT] subtest: [keepalive][iframe][load] mixed content redirect; setting up
  • ERROR [expected OK] /fetch/api/response/response-body-read-task-handling.html
    • PASS [expected FAIL] subtest: reading from a body stream should occur in a microtask scope
  • TIMEOUT [expected OK] /fetch/content-encoding/br/big-br-body.https.any.worker.html
    • TIMEOUT [expected PASS] subtest: large br data should be decompressed successfully

      Test timed out
      

    • NOTRUN [expected FAIL] subtest: large br data should be decompressed successfully with byte stream
  • OK [expected ERROR] /fetch/fetch-later/quota/same-origin-iframe/multiple-iframes.https.window.html (#35176)
  • TIMEOUT /fetch/metadata/generated/css-images.https.sub.tentative.html (#42229)
    • FAIL [expected PASS] subtest: content sec-fetch-site - Cross-Site -&gt; Same-Site

      assert_unreached: Reached unreachable code
      

    • FAIL [expected PASS] subtest: content sec-fetch-site - Same-Origin -&gt; Same-Site

      assert_unreached: Reached unreachable code
      

  • OK /html/browsers/browsing-the-web/navigating-across-documents/navigation-unload-same-origin.window.html (#29049)
    • PASS [expected FAIL] subtest: Same-origin navigation started from unload handler must be ignored
  • OK /html/browsers/browsing-the-web/navigating-across-documents/refresh/same-document-refresh.html (#34597)
    • FAIL [expected PASS] subtest: Same-Document Referrer from Refresh

      assert_equals: original page loads expected "http://web-platform.test:8000/html/browsers/browsing-the-web/navigating-across-documents/refresh/resources/refresh-with-section.sub.html?url=%23section" but got "http://web-platform.test:8000/html/browsers/browsing-the-web/navigating-across-documents/refresh/resources/refresh-with-section.sub.html?url=%23section#section"
      

  • OK [expected TIMEOUT] /html/browsers/browsing-the-web/navigating-across-documents/replace-before-load/form-requestsubmit.html (#44098)
    • FAIL [expected TIMEOUT] subtest: Replace before load, triggered by formElement.requestSubmit()

      assert_equals: expected "http://web-platform.test:8000/common/blank.html?thereplacement=" but got "http://web-platform.test:8000/html/browsers/browsing-the-web/navigating-across-documents/replace-before-load/resources/code-injector.html?pipe=sub(none)&amp;code=%0A%20%20%20%20const%20form%20%3D%20document.createElement(%22form%22)%3B%0A%20%20%20%20form.action%20%3D%20%22%2Fcommon%2Fblank.html%22%3B%0A%0A%20%20%20%20const%20input%20%3D%20document.createElement(%22input%22)%3B%0A%20%20%20%20input.type%20%3D%20%22hidden%22%3B%0A%20%20%20%20input.name%20%3D%20%22thereplacement%22%3B%0A%20%20%20%20form.append(input)%3B%0A%0A%20%20%20%20document.currentScript.before(form)%3B%0A%20%20%20%20form.requestSubmit()%3B%0A%20%20"
      

  • OK /html/browsers/windows/browsing-context-names/duplicate-name-order.html (#34623)
    • PASS [expected FAIL] subtest: Duplicate name lookup order
  • OK [expected TIMEOUT] /html/semantics/embedded-content/media-elements/autoplay-default-permissions-policy.https.sub.html (#46805)
    • PASS [expected TIMEOUT] subtest: Default "autoplay" feature policy ["self"] allows same-origin iframes.
  • OK /html/semantics/embedded-content/the-iframe-element/iframe-loading-lazy-nav-location-assign.html (#32863)
    • FAIL [expected PASS] subtest: Navigating iframe loading='lazy' before it is loaded: location.assign

      uncaught exception: Error: assert_equals: expected "http://web-platform.test:8000/html/semantics/embedded-content/the-iframe-element/support/blank.htm?nav" but got "http://web-platform.test:8000/html/semantics/embedded-content/the-iframe-element/support/blank.htm?src"
      

  • TIMEOUT [expected OK] /html/user-activation/navigation-state-reset-sameorigin.html (#45151)
    • TIMEOUT [expected FAIL] subtest: Post-navigation state reset.

      Test timed out
      

  • OK /infrastructure/testdriver/click_iframe.html
    • FAIL [expected PASS] subtest: TestDriver click on a document in an iframe

      Unhandled rejection: assert_unreached: click failed Reached unreachable code
      

  • ERROR [expected OK] /intersection-observer/v2/animated-opacity.html (#40827)
  • OK /resource-timing/buffer-full-then-increased.html (#44408)
    • FAIL [expected PASS] subtest: Test that overflowing the buffer and immediately increasing its limit does not trigger the resourcetimingbufferfull event

      assert_equals: Number of entries does not match the expected value. expected 3 but got 1
      

  • OK /sanitizer-api/sanitizer-inert-document.html (#45260)
    • PASS [expected FAIL] subtest: Test whether setHTML loads the image.
    • FAIL [expected PASS] subtest: Test whether setHTMLUnsafe loads the image.

      promise_test: Unhandled rejection with value: "The server observed a request. It shouldn't have."
      

  • TIMEOUT /trusted-types/trusted-types-navigation.html?06-10 (#37920)
    • FAIL [expected TIMEOUT] subtest: Navigate a frame via anchor with javascript:-urls in report-only mode.

      promise_test: Unhandled rejection with value: "Unexpected message received: \"No securitypolicyviolation reported!\""
      

    • TIMEOUT [expected NOTRUN] subtest: Navigate a frame via anchor with javascript:-urls w/ default policy in report-only mode.

      Test timed out
      

  • TIMEOUT [expected OK] /trusted-types/trusted-types-navigation.html?16-20 (#44835)
    • TIMEOUT [expected PASS] subtest: Navigate a frame via area with javascript:-urls w/ default policy in report-only mode.

      Test timed out
      

  • CRASH [expected OK] /trusted-types/trusted-types-report-only.html
  • OK /upgrade-insecure-requests/gen/sharedworker-module-data.meta/unset/fetch.https.html
    • FAIL [expected PASS] subtest: Upgrade-Insecure-Requests: Expects blocked for fetch to cross-http-downgrade origin and downgrade redirection from https context.

      assert_equals: The resource request should be 'blocked'. expected "blocked" but got "allowed"
      

    • FAIL [expected PASS] subtest: Upgrade-Insecure-Requests: Expects blocked for fetch to cross-http-downgrade origin and no-redirect redirection from https context.

      assert_equals: The resource request should be 'blocked'. expected "blocked" but got "allowed"
      

    • FAIL [expected PASS] subtest: Upgrade-Insecure-Requests: Expects blocked for fetch to cross-https origin and downgrade redirection from https context.

      assert_equals: The resource request should be 'blocked'. expected "blocked" but got "allowed"
      

    • FAIL [expected PASS] subtest: Upgrade-Insecure-Requests: Expects blocked for fetch to same-http-downgrade origin and downgrade redirection from https context.

      assert_equals: The resource request should be 'blocked'. expected "blocked" but got "allowed"
      

    • FAIL [expected PASS] subtest: Upgrade-Insecure-Requests: Expects blocked for fetch to same-http-downgrade origin and no-redirect redirection from https context.

      assert_equals: The resource request should be 'blocked'. expected "blocked" but got "allowed"
      

    • FAIL [expected PASS] subtest: Upgrade-Insecure-Requests: Expects blocked for fetch to same-https origin and downgrade redirection from https context.

      assert_equals: The resource request should be 'blocked'. expected "blocked" but got "allowed"
      

  • OK /user-timing/measure_associated_with_navigation_timing.html (#47273)
    • PASS [expected FAIL] subtest: loadTime plus loadEventEnd to a mark "a" should equal to navigationStart to "a".
  • TIMEOUT [expected OK] /webstorage/storage_local_setitem_quotaexceedederr.window.html
  • CRASH [expected OK] /webstorage/storage_session_setitem_quotaexceedederr.window.html
Stable unexpected results that are known to be intermittent (14)
  • TIMEOUT [expected OK] /_mozilla/mozilla/window-resize-event.html (#36741)
    • TIMEOUT [expected PASS] subtest: Popup onresize event fires after resizeTo

      Test timed out
      

  • OK /beacon/beacon-basic.https.window.html (#41723)
    • FAIL [expected PASS] subtest: Payload size restriction should be accumulated: type = string

      assert_false: expected false got true
      

    • PASS [expected FAIL] subtest: Payload size restriction should be accumulated: type = arraybuffer
    • PASS [expected FAIL] subtest: Payload size restriction should be accumulated: type = blob
  • OK /css/css-flexbox/text-as-flexitem-size-001.html (#47104)
    • PASS [expected FAIL] subtest: .flexbox &gt; div 1
    • PASS [expected FAIL] subtest: .flexbox &gt; div 2
    • PASS [expected FAIL] subtest: .flexbox &gt; div 5
    • PASS [expected FAIL] subtest: .flexbox &gt; div 8
    • PASS [expected FAIL] subtest: .flexbox &gt; div 11
  • ERROR [expected OK] /css/css-sizing/responsive-iframe/responsive-iframe-allow-origins.html?container=subdomain,origin=same,allowed=wildcard,expect=400 (#47268)
  • OK /dom/nodes/moveBefore/iframe-document-preserve.window.html (#43152)
    • FAIL [expected PASS] subtest: moveBefore(): cross-origin iframe is preserved: remove new parent

      assert_equals: iframe does not fire a second load event expected 1 but got 0
      

  • TIMEOUT /fetch/metadata/generated/css-images.sub.tentative.html (#29047)
    • FAIL [expected PASS] subtest: content sec-fetch-storage-access - Not sent to non-trustworthy same-site destination

      assert_unreached: Reached unreachable code
      

  • OK [expected TIMEOUT] /html/browsers/browsing-the-web/navigating-across-documents/replace-before-load/form-submit.html (#44028)
  • TIMEOUT [expected CRASH] /html/browsers/history/the-location-interface/location_replace_session_history.html (#41896)
  • OK [expected TIMEOUT] /html/semantics/embedded-content/media-elements/autoplay-allowed-by-permissions-policy.https.sub.html (#46803)
    • PASS [expected TIMEOUT] subtest: Permissions-Policy header: autoplay * allows same-origin iframes.
  • OK [expected TIMEOUT] /html/semantics/embedded-content/media-elements/autoplay-disabled-by-permissions-policy.https.sub.html (#46012, #46804)
  • OK /html/semantics/embedded-content/media-elements/media_fragment_seek.html (#24114)
    • FAIL [expected PASS] subtest: Video should seek to time specified in media fragment syntax

      assert_equals: expected 1 but got 0
      

  • OK [expected TIMEOUT] /html/semantics/embedded-content/media-elements/src_object_blob.html (#40340)
    • PASS [expected TIMEOUT] subtest: HTMLMediaElement.srcObject blob
  • OK /resource-timing/buffer-full-add-then-clear.html (#40819)
    • PASS [expected FAIL] subtest: Test that if the buffer is cleared after entries were added to the secondary buffer, those entries make it into the primary one
  • OK [expected TIMEOUT] /webstorage/localstorage-about-blank-3P-iframe-opens-3P-window.partitioned.html (#29053)
    • FAIL [expected TIMEOUT] subtest: StorageKey: test 3P about:blank window opened from a 3P iframe

      assert_true: about:blank window opened by 3P iframe does not inherit 3P iframe's StorageKey expected true got false
      

Stable unexpected results (6)
  • OK /content-security-policy/inheritance/iframe-all-local-schemes.sub.html
    • PASS [expected FAIL] subtest: window url='javascript:...'&gt;'s inherits policy (static &lt;img&gt; is blocked)
  • OK /content-security-policy/inheritance/inheritance-from-initiator.sub.html?scheme=javascript
    • PASS [expected FAIL] subtest: javascript: Setting src inherits from parent (apart from javascript:, which keeps target policies).
    • PASS [expected FAIL] subtest: javascript: Changing contentWindow.location inherits from who changed it (apart from javascript:, which keeps target policies, and blob:, which always inherits from creator).
    • PASS [expected FAIL] subtest: javascript: Changing contentWindow.location indirectly inherits from who changed it directly (apart from javascript:, which keeps target policies).
    • PASS [expected FAIL] subtest: javascript: Click on anchor inherits from owner of the anchor (apart from javascript:, which keeps target policies, and blob:, which always inherits from creator).
    • PASS [expected FAIL] subtest: javascript: Form submission through submit() inherits from owner of form (apart from javascript:, which keeps target policies).
    • PASS [expected FAIL] subtest: javascript: Form submission through button click inherits from owner of form (apart from javascript:, which keeps target policies).
  • OK /content-security-policy/inheritance/javascript-url-open-in-main-window.html
    • PASS [expected FAIL] subtest: Executing Javascript URL keeps enforcing previous CSPs of the document.
  • OK /content-security-policy/inheritance/window.html
    • PASS [expected FAIL] subtest: window.open('javascript:...') inherits policy.
  • OK /content-security-policy/navigation/javascript-url-navigation-evaluated-to-string-inherits-csp.html
    • PASS [expected FAIL] subtest: Violation report status OK.
  • OK /referrer-policy/generic/inheritance/iframe-inheritance-javascript-child.html
    • PASS [expected FAIL] subtest: Referrer Policy: iframes with javascript url reuse referrer policy 3

@github-actions

Copy link
Copy Markdown

⚠️ Try run (#32783250714) failed!

@jdm

jdm commented Aug 24, 2026

Copy link
Copy Markdown
Member

Those are very promising results!

This change makes it so that the "evaluate a JavaScript URL" procedure
from the specification is more faithfully implemented. In particular, it
builds and executes a classic script, which nows grows the ability to
return a value, as specified. More specification steps are filled out in
general.

Signed-off-by: Martin Robinson <mrobinson@igalia.com>
@mrobinson
mrobinson marked this pull request as ready for review August 25, 2026 05:20
@mrobinson

Copy link
Copy Markdown
Member Author

Okay. This one is ready for a review.

introduction_type: Option<&'static CStr>,
line_number: u32,
external: bool,
returns_a_value: bool,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: introduce an enum ScriptReturnsAValue with members Yes and No. That way the code comments are unnecessary and the compiler will complain when the argument is accidentally used for external

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've gone ahead and made a ScriptOptions bitflags struct to hold three of the boolean parameters passed to classic script creation. I think this simplifies the code a lot.


// Step 13. Let finalSandboxFlags be policyContainer's CSP list's CSP-derived
// sandboxing flags.
load_data.creation_sandboxing_flag_set |= sandbox_flags;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the spec means this. Otherwise we might have discovered a spec bug?

Suggested change
load_data.creation_sandboxing_flag_set |= sandbox_flags;
load_data.creation_sandboxing_flag_set = sandbox_flags;

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In fact, I think this line of code is completely wrong, because the specification talks about the "final sandbox flags", but I'm assigned the "creation sandbox flags" here. I've just removed this entirely.

@servo-highfive servo-highfive removed the S-awaiting-review There is new code that needs to be reviewed. label Aug 25, 2026
@jdm

jdm commented Aug 25, 2026 •

Copy link
Copy Markdown
Member

Oh no, I just realized why these changes looked so familiar. I thought #46611 had already merged, but it hasn't yet and there's a huge amount of overlap.

@mrobinson

mrobinson commented Aug 25, 2026 •

Copy link
Copy Markdown
Member Author

Oh no, I just realized why these changes looked so familiar. I thought #46611 had already merged, but it hasn't yet and there's a huge amount of overlap.

Did you mean a different PR here? #46611 already seems to be merged.

- Create a `ScriptOptions` to hold options passed to classic scripts
- Respond to review comments
- Make a variety of small comment / documentation improvements

Signed-off-by: Martin Robinson <mrobinson@abandonedwig.info>
@servo-highfive servo-highfive added the S-awaiting-review There is new code that needs to be reviewed. label Aug 25, 2026
@mrobinson mrobinson added the T-linux-wpt Do a try run of the WPT label Aug 25, 2026
@github-actions github-actions Bot removed the T-linux-wpt Do a try run of the WPT label Aug 25, 2026
@github-actions

Copy link
Copy Markdown

🔨 Triggering try run (#32815809600) for Linux (WPT)

@github-actions

Copy link
Copy Markdown

Test results for linux-wpt from try job (#32815809600):

Flaky unexpected result (33)
  • TIMEOUT [expected OK] /_webgl/conformance/extensions/oes-texture-float-linear.html
    • NOTRUN [expected PASS] subtest: Overall test
  • OK [expected TIMEOUT] /content-security-policy/inheritance/auxiliary-blank-document.html (#44821)
    • PASS [expected TIMEOUT] subtest: window.open() inherits CSPs on transient about:blank.
  • OK /css/CSS2/linebox/inline-negative-margin-001.html (#43763)
    • FAIL [expected PASS] subtest: [data-expected-height] 3

      assert_equals: 
      &lt;div class="w4" data-expected-height="10"&gt;123 &lt;span style="margin-left: -4ch"&gt;1234 &lt;/span&gt;&lt;/div&gt;
      height expected 10 but got 20
      

    • FAIL [expected PASS] subtest: [data-expected-height] 4

      assert_equals: 
      &lt;div class="w4" data-expected-height="10"&gt;123 &lt;span style="margin-left: -4ch"&gt;123 &lt;/span&gt;&lt;/div&gt;
      height expected 10 but got 20
      

    • FAIL [expected PASS] subtest: [data-expected-height] 5

      assert_equals: 
      &lt;div class="w4" data-expected-height="10"&gt;&lt;img class="w4"&gt;&lt;span style="margin-left: -4ch"&gt;123&lt;/span&gt;&lt;/div&gt;
      height expected 10 but got 20
      

    • FAIL [expected PASS] subtest: [data-expected-height] 6

      assert_equals: 
      &lt;div class="w4" data-expected-height="10"&gt;&lt;img class="w5"&gt;&lt;span style="margin-left: -5ch"&gt;123&lt;/span&gt;&lt;/div&gt;
      height expected 10 but got 20
      

  • OK /css/css-fonts/variations/at-font-face-font-matching.html (#20684)
    • FAIL [expected PASS] subtest: Matching font-weight: '500' should prefer '350 399' over '351 398'

      assert_equals: Unexpected font on test element expected 487 but got 532
      

    • FAIL [expected PASS] subtest: Matching font-weight: '399' should prefer '450 460' over '500 501'

      assert_equals: Unexpected font on test element expected 487 but got 532
      

    • FAIL [expected PASS] subtest: Matching font-style: 'oblique 20deg' should prefer 'oblique 40deg 50deg' over 'oblique 10deg'

      assert_equals: Unexpected font on test element expected 487 but got 532
      

    • FAIL [expected PASS] subtest: Matching font-style: 'oblique 21deg' should prefer 'oblique 21deg' over 'oblique 30deg 60deg'

      assert_equals: Unexpected font on test element expected 487 but got 532
      

  • ERROR [expected TIMEOUT] /css/css-sizing/responsive-iframe/responsive-iframe-allow-origins.html?container=subdomain,origin=cross,allowed=wildcard,expect=400 (#47268)
  • PASS [expected FAIL] /css/css-text-decor/text-underline-position-from-font-variable.html (#45615)
  • TIMEOUT [expected OK] /dom/nodes/NodeList-static-length-getter-tampered-indexOf-3.html
  • OK /fetch/api/abort/general.any.worker.html
    • FAIL [expected PASS] subtest: Stream errors once aborted, after reading. Underlying connection closed.

      promise_test: Unhandled rejection with value: object "Error: Timed out"
      

  • OK [expected TIMEOUT] /fetch/api/redirect/redirect-keepalive.https.any.html (#32153)
    • PASS [expected TIMEOUT] subtest: [keepalive][iframe][load] mixed content redirect; setting up
  • TIMEOUT [expected OK] /fetch/content-encoding/br/big-br-body.https.any.worker.html
    • TIMEOUT [expected PASS] subtest: large br data should be decompressed successfully

      Test timed out
      

    • NOTRUN [expected FAIL] subtest: large br data should be decompressed successfully with byte stream
  • TIMEOUT [expected OK] /fetch/content-encoding/zstd/big-zstd-body.https.any.worker.html
    • TIMEOUT [expected PASS] subtest: large zstd data should be decompressed successfully

      Test timed out
      

    • NOTRUN [expected FAIL] subtest: large zstd data should be decompressed successfully with byte stream
  • OK [expected ERROR] /fetch/fetch-later/quota/same-origin-iframe/sandboxed-iframe.https.window.html (#41704)
  • OK /html/browsers/browsing-the-web/navigating-across-documents/navigation-unload-same-origin-fragment.html (#20768)
    • PASS [expected FAIL] subtest: Tests that a fragment navigation in the unload handler will not block the initial navigation
  • OK /html/semantics/embedded-content/media-elements/seeking/seek-to-currentTime.html (#46014)
    • FAIL [expected PASS] subtest: seek to currentTime

      assert_array_equals: fired events lengths differ, expected array ["seeking", "timeupdate", "seeked"] length 3, got ["seeking", "timeupdate", "timeupdate", "seeked"] length 4
      

  • OK /html/semantics/forms/form-submission-0/jsurl-form-submit.tentative.html (#36489)
    • PASS [expected FAIL] subtest: Verifies that form submissions scheduled inside javascript: urls take precedence over the javascript: url's return value.
  • OK /html/semantics/scripting-1/the-script-element/execution-timing/077.html (#22139)
    • FAIL [expected PASS] subtest: adding several types of scripts through the DOM and removing some of them confuses scheduler

      assert_array_equals: expected property 1 to be "Script #1 ran" but got "Script #3 ran" (expected array ["Script #2 ran", "Script #1 ran", "Script #3 ran", "Script #4 ran"] got ["Script #2 ran", "Script #3 ran", "Script #4 ran", "Script #1 ran"])
      

  • TIMEOUT [expected OK] /html/user-activation/navigation-state-reset-sameorigin.html (#45151)
    • TIMEOUT [expected FAIL] subtest: Post-navigation state reset.

      Test timed out
      

  • OK /html/webappapis/user-prompts/print-during-unload.html (#35944)
    • FAIL [expected PASS] subtest: print() during unload

      assert_array_equals: expected property 1 to be "destination" but got "error: window.print is not a function" (expected array ["start", "destination"] got ["start", "error: window.print is not a function"])
      

  • OK /infrastructure/testdriver/click_iframe.html
    • FAIL [expected PASS] subtest: TestDriver click on a document in an iframe

      Unhandled rejection: assert_unreached: click failed Reached unreachable code
      

  • OK /mixed-content/tentative/autoupgrades/mixed-content-cors.https.sub.html (#41123)
    • FAIL [expected PASS] subtest: Cross-Origin video should get upgraded even if CORS is set

      assert_equals: Length. Other host expected 1 but got Infinity
      

  • TIMEOUT [expected OK] /pointerevents/compat/pointerevent_touch-action_two-finger_interaction.html (#44693)
    • NOTRUN [expected PASS] subtest: touch two-finger pan on 'touch-action: pan-x pan-y'
    • NOTRUN [expected FAIL] subtest: touch two-finger pan on 'touch-action: pinch-zoom'
  • OK /pointerevents/pointerevent_pointercapture_in_frame.html?touch (#45445)
    • FAIL [expected PASS] subtest: Test touchpointer capture in same-origin frame: Pointer down at inner frame and set pointer capture to outer frame should not capture.

      assert_array_equals: Received events: innerFrame received pointerdown,innerFrame received pointermove,innerFrame received pointerup,innerFrame received lostpointercapture lengths differ, expected array ["innerFrame received pointerdown", "innerFrame received pointermove", "innerFrame received pointerup"] length 3, got ["innerFrame received pointerdown", "innerFrame received pointermove", "innerFrame received pointerup", "innerFrame received lostpointercapture"] length 4
      

  • OK /resource-timing/buffer-full-add-then-clear.html (#40819)
    • PASS [expected FAIL] subtest: Test that if the buffer is cleared after entries were added to the secondary buffer, those entries make it into the primary one
  • OK /resource-timing/test_resource_timing.https.html (#25216)
    • PASS [expected FAIL] subtest: PerformanceEntry has correct name, initiatorType, startTime, and duration (script)
  • OK /touch-events/mouseevents-after-touchend.tentative.html (#46497)
    • PASS [expected FAIL] subtest: Single tap should cause a click
    • PASS [expected FAIL] subtest: Tapping too far points should not cause a dblclick
  • CRASH [expected OK] /trusted-types/TrustedTypePolicyFactory-createPolicy-unenforced.html
  • OK [expected TIMEOUT] /trusted-types/inheriting-csp-for-local-schemes.html (#47400)
    • FAIL [expected TIMEOUT] subtest: require-trusted-types-for directive should be inherited in local data frames

      assert_not_equals: got disallowed value null
      

    • FAIL [expected NOTRUN] subtest: trusted-types directive should be inherited in local data frames

      assert_not_equals: got disallowed value null
      

    • FAIL [expected NOTRUN] subtest: require-trusted-types-for directive should be inherited in local blob frames

      assert_not_equals: got disallowed value null
      

    • FAIL [expected NOTRUN] subtest: trusted-types directive should be inherited in local blob frames

      assert_not_equals: got disallowed value null
      

    • PASS [expected NOTRUN] subtest: require-trusted-types-for directive should be inherited in local about:blank frames
    • PASS [expected NOTRUN] subtest: trusted-types directive should be inherited in local about:blank frames
    • PASS [expected NOTRUN] subtest: require-trusted-types-for directive should not be inherited in local blank.html frames
    • PASS [expected NOTRUN] subtest: trusted-types directive should not be inherited in local blank.html frames
  • TIMEOUT /trusted-types/trusted-types-navigation.html?06-10 (#37920)
    • FAIL [expected TIMEOUT] subtest: Navigate a frame via anchor with javascript:-urls in report-only mode.

      promise_test: Unhandled rejection with value: "Unexpected message received: \"No securitypolicyviolation reported!\""
      

    • TIMEOUT [expected NOTRUN] subtest: Navigate a frame via anchor with javascript:-urls w/ default policy in report-only mode.

      Test timed out
      

  • TIMEOUT [expected OK] /trusted-types/trusted-types-navigation.html?16-20 (#44835)
    • TIMEOUT [expected PASS] subtest: Navigate a frame via area with javascript:-urls w/ default policy in enforcing mode.

      Test timed out
      

    • NOTRUN [expected FAIL] subtest: Navigate a frame via area with javascript:-urls in report-only mode.
    • NOTRUN [expected PASS] subtest: Navigate a frame via area with javascript:-urls w/ default policy in report-only mode.
  • OK [expected TIMEOUT] /trusted-types/trusted-types-navigation.html?26-30 (#38807)
    • PASS [expected TIMEOUT] subtest: Navigate a window via form-submission with javascript:-urls in report-only mode.
    • PASS [expected NOTRUN] subtest: Navigate a window via form-submission with javascript:-urls w/ default policy in report-only mode.
    • PASS [expected NOTRUN] subtest: Navigate a frame via form-submission with javascript:-urls in enforcing mode.
    • PASS [expected NOTRUN] subtest: Navigate a frame via form-submission with javascript:-urls w/ default policy in enforcing mode.
  • OK /upgrade-insecure-requests/gen/sharedworker-module-data.meta/upgrade/xhr.https.html
    • FAIL [expected PASS] subtest: Upgrade-Insecure-Requests: Expects allowed for xhr to cross-http-downgrade origin and downgrade redirection from https context.

      assert_equals: The resource request should be 'allowed'. expected "allowed" but got "blocked"
      

    • FAIL [expected PASS] subtest: Upgrade-Insecure-Requests: Expects allowed for xhr to cross-http-downgrade origin and no-redirect redirection from https context.

      assert_equals: The resource request should be 'allowed'. expected "allowed" but got "blocked"
      

    • FAIL [expected PASS] subtest: Upgrade-Insecure-Requests: Expects allowed for xhr to cross-https origin and downgrade redirection from https context.

      assert_equals: The resource request should be 'allowed'. expected "allowed" but got "blocked"
      

    • FAIL [expected PASS] subtest: Upgrade-Insecure-Requests: Expects allowed for xhr to same-http-downgrade origin and downgrade redirection from https context.

      assert_equals: The resource request should be 'allowed'. expected "allowed" but got "blocked"
      

    • FAIL [expected PASS] subtest: Upgrade-Insecure-Requests: Expects allowed for xhr to same-http-downgrade origin and no-redirect redirection from https context.

      assert_equals: The resource request should be 'allowed'. expected "allowed" but got "blocked"
      

    • FAIL [expected PASS] subtest: Upgrade-Insecure-Requests: Expects allowed for xhr to same-https origin and downgrade redirection from https context.

      assert_equals: The resource request should be 'allowed'. expected "allowed" but got "blocked"
      

  • OK /visual-viewport/resize-event-order.html (#41981)
    • PASS [expected FAIL] subtest: Popup: DOMWindow resize fired before VisualViewport.
  • TIMEOUT [expected OK] /webstorage/storage_local_setitem_quotaexceedederr.window.html
Stable unexpected results that are known to be intermittent (13)
  • TIMEOUT [expected OK] /_mozilla/mozilla/window-resize-event.html (#36741)
    • TIMEOUT [expected PASS] subtest: Popup onresize event fires after resizeTo

      Test timed out
      

  • OK /_webgl/conformance/textures/misc/texture-upload-size.html (#21770)
    • FAIL [expected PASS] subtest: WebGL test #45

      assert_true: Texture was smaller than the expected size 2x2 expected true got false
      

    • FAIL [expected PASS] subtest: WebGL test #47

      assert_true: getError expected: INVALID_VALUE. Was NO_ERROR : when calling texSubImage2D with the same texture upload with offset 1, 1 expected true got false
      

    • FAIL [expected PASS] subtest: WebGL test #49

      assert_true: Texture was smaller than the expected size 2x2 expected true got false
      

    • FAIL [expected PASS] subtest: WebGL test #51

      assert_true: getError expected: INVALID_VALUE. Was NO_ERROR : when calling texSubImage2D with the same texture upload with offset 1, 1 expected true got false
      

    • PASS [expected FAIL] subtest: WebGL test #53
    • PASS [expected FAIL] subtest: WebGL test #55
    • PASS [expected FAIL] subtest: WebGL test #57
    • PASS [expected FAIL] subtest: WebGL test #59
    • FAIL [expected PASS] subtest: WebGL test #61

      assert_true: Texture was smaller than the expected size 2x2 expected true got false
      

    • FAIL [expected PASS] subtest: WebGL test #63

      assert_true: getError expected: INVALID_VALUE. Was NO_ERROR : when calling texSubImage2D with the same texture upload with offset 1, 1 expected true got false
      

    • And 22 more unexpected results...
  • OK /beacon/beacon-basic.https.window.html (#41723)
    • PASS [expected FAIL] subtest: Payload size restriction should be accumulated: type = blob
  • ERROR [expected OK] /css/css-sizing/responsive-iframe/responsive-iframe-allow-origins.html?container=subdomain,origin=same,allowed=wildcard,expect=400 (#47268)
  • OK /dom/nodes/moveBefore/iframe-document-preserve.window.html (#43152)
    • FAIL [expected PASS] subtest: moveBefore(): cross-origin iframe is preserved: remove self via replaceChildren()

      assert_equals: iframe does not fire a second load event expected 1 but got 0
      

  • OK [expected ERROR] /fetch/fetch-later/quota/same-origin-iframe/multiple-iframes.https.window.html (#35176)
  • OK [expected TIMEOUT] /html/browsers/browsing-the-web/navigating-across-documents/replace-before-load/form-submit-button-click.html (#44099)
    • FAIL [expected TIMEOUT] subtest: Replace before load, triggered by submitButton.click()

      assert_equals: expected "http://web-platform.test:8000/common/blank.html?thereplacement=" but got "http://web-platform.test:8000/html/browsers/browsing-the-web/navigating-across-documents/replace-before-load/resources/code-injector.html?pipe=sub(none)&amp;code=%0A%20%20%20%20const%20form%20%3D%20document.createElement(%22form%22)%3B%0A%20%20%20%20form.action%20%3D%20%22%2Fcommon%2Fblank.html%22%3B%0A%0A%20%20%20%20const%20input%20%3D%20document.createElement(%22input%22)%3B%0A%20%20%20%20input.type%20%3D%20%22hidden%22%3B%0A%20%20%20%20input.name%20%3D%20%22thereplacement%22%3B%0A%20%20%20%20form.append(input)%3B%0A%0A%20%20%20%20const%20button%20%3D%20document.createElement(%22button%22)%3B%0A%20%20%20%20button.type%20%3D%20%22submit%22%3B%0A%20%20%20%20form.append(button)%3B%0A%0A%20%20%20%20document.currentScript.before(form)%3B%0A%20%20%20%20button.click()%3B%0A%20%20"
      

  • TIMEOUT /html/browsers/history/the-history-interface/001.html (#12580)
    • PASS [expected FAIL] subtest: traversing history must also traverse hash changes
  • TIMEOUT [expected CRASH] /html/browsers/history/the-location-interface/location_replace_session_history.html (#41896)
  • TIMEOUT /html/semantics/embedded-content/media-elements/autoplay-allowed-by-permissions-policy.https.sub.html (#46803)
    • TIMEOUT [expected PASS] subtest: Permissions-Policy header: autoplay * allows the top-level document.

      Test timed out
      

  • OK [expected TIMEOUT] /html/semantics/embedded-content/media-elements/autoplay-disabled-by-permissions-policy.https.sub.html (#46012, #46804)
  • OK [expected TIMEOUT] /html/semantics/embedded-content/media-elements/src_object_blob.html (#40340)
    • PASS [expected TIMEOUT] subtest: HTMLMediaElement.srcObject blob
  • OK /pointerevents/pointerevent_pointercapture_in_frame.html?pen (#45536)
    • FAIL [expected PASS] subtest: Test penpointer capture in same-origin frame: Pointer down at inner frame and set pointer capture to outer frame should not capture.

      assert_array_equals: Received events: innerFrame received pointerdown,innerFrame received pointermove,innerFrame received pointerup,innerFrame received lostpointercapture lengths differ, expected array ["innerFrame received pointerdown", "innerFrame received pointermove", "innerFrame received pointerup"] length 3, got ["innerFrame received pointerdown", "innerFrame received pointermove", "innerFrame received pointerup", "innerFrame received lostpointercapture"] length 4
      

@github-actions

Copy link
Copy Markdown

✨ Try run (#32815809600) succeeded.

@amittenak47

Copy link
Copy Markdown
Contributor

Oh no, I just realized why these changes looked so familiar. I thought #46611 had already merged, but it hasn't yet and there's a huge amount of overlap.

Did you mean a different PR here? #46611 already seems to be merged.

It's not merged, but i think that PR was addressing a separate issue that unnecessarily overlapped with this. I can rebase that after this, so it cleanly separates the two changes

@mrobinson
mrobinson added this pull request to the merge queue Aug 25, 2026
@servo-highfive servo-highfive added the S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. label Aug 25, 2026
@jdm

jdm commented Aug 25, 2026

Copy link
Copy Markdown
Member

Oh no, I just realized why these changes looked so familiar. I thought #46611 had already merged, but it hasn't yet and there's a huge amount of overlap.

Did you mean a different PR here? #46611 already seems to be merged.

You must have looked at the comment I left which referenced a different issue before I edited it. #46611 is not merged.

Merged via the queue into servo:main with commit d52e138 Aug 25, 2026
76 checks passed
@mrobinson
mrobinson deleted the trusted-types-3 branch August 25, 2026 12:13
@servo-highfive servo-highfive removed the S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. label Aug 25, 2026
RichardTjokroutomo pushed a commit to RichardTjokroutomo/servo that referenced this pull request Oct 6, 2026
…47486)

This change makes it so that the "evaluate a JavaScript URL" procedure
from the specification is more faithfully implemented. In particular, it
builds and executes a classic script, which nows grows the ability to
return a value, as specified. More specification steps are filled out in
general.
    
Testing: This results in a progression on a decent number of WPT
subtests.

---------

Signed-off-by: Martin Robinson <mrobinson@igalia.com>
Signed-off-by: Martin Robinson <mrobinson@abandonedwig.info>
Psychpsyo pushed a commit to Psychpsyo/servo that referenced this pull request Oct 12, 2026
…47486)

This change makes it so that the "evaluate a JavaScript URL" procedure
from the specification is more faithfully implemented. In particular, it
builds and executes a classic script, which nows grows the ability to
return a value, as specified. More specification steps are filled out in
general.
    
Testing: This results in a progression on a decent number of WPT
subtests.

---------

Signed-off-by: Martin Robinson <mrobinson@igalia.com>
Signed-off-by: Martin Robinson <mrobinson@abandonedwig.info>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-awaiting-review There is new code that needs to be reviewed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants