Skip to content

script: Remove check for zero request body length in FetchLater#43627

Draft
TimvdLippe wants to merge 1 commit intoservo:mainfrom
TimvdLippe:update-fetch-later-empty-request
Draft

script: Remove check for zero request body length in FetchLater#43627
TimvdLippe wants to merge 1 commit intoservo:mainfrom
TimvdLippe:update-fetch-later-empty-request

Conversation

@TimvdLippe
Copy link
Copy Markdown
Contributor

@TimvdLippe TimvdLippe commented Mar 24, 2026

Per the spec discussion in 1 we should only check for a length of null and not zero.

Testing: Updates WPT test according to spec

@TimvdLippe TimvdLippe requested a review from gterzian as a code owner March 24, 2026 18:48
@TimvdLippe TimvdLippe added the T-linux-wpt Do a try run of the WPT label Mar 24, 2026
@servo-highfive servo-highfive added the S-awaiting-review There is new code that needs to be reviewed. label Mar 24, 2026
@github-actions github-actions bot removed the T-linux-wpt Do a try run of the WPT label Mar 24, 2026
@github-actions
Copy link
Copy Markdown

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

Copy link
Copy Markdown
Member

@mrobinson mrobinson left a comment

Choose a reason for hiding this comment

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

Do you mind adding a Testing: line the PR description before landing?

@servo-wpt-sync
Copy link
Copy Markdown
Collaborator

🤖 Opened new upstream WPT pull request (web-platform-tests/wpt#58726) with upstreamable changes.

@TimvdLippe TimvdLippe marked this pull request as draft March 24, 2026 18:54
@TimvdLippe
Copy link
Copy Markdown
Contributor Author

Marking as draft to avoid an accidental merge before the WPT PR is reviewed

@servo-wpt-sync
Copy link
Copy Markdown
Collaborator

✍ Updated existing upstream WPT pull request (web-platform-tests/wpt#58726) title and body.

@github-actions
Copy link
Copy Markdown

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

Flaky unexpected result (35)
  • TIMEOUT [expected OK] /_mozilla/mozilla/img_find_non_sibling_map.html
  • CRASH [expected PASS] /_mozilla/shadow-dom/move-element-with-ua-shadow-tree-crash.html (#39473)
  • CRASH [expected OK] /_webgl/conformance/textures/canvas_sub_rectangle/tex-2d-luminance-luminance-unsigned_byte.html
  • OK /_webgl/conformance/textures/misc/texture-upload-size.html (#21770)
    • PASS [expected FAIL] subtest: WebGL test #93
    • PASS [expected FAIL] subtest: WebGL test #95
    • PASS [expected FAIL] subtest: WebGL test #97
    • PASS [expected FAIL] subtest: WebGL test #99
    • FAIL [expected PASS] subtest: WebGL test #101

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

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

      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 #105

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

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

      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
      

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

      assert_false: expected false got true
      

  • OK /content-security-policy/frame-ancestors/frame-ancestors-path-ignored.window.html (#36468)
    • PASS [expected FAIL] subtest: A 'frame-ancestors' CSP directive with a URL that includes a path should be ignored.
  • CRASH [expected PASS] /css/compositing/mix-blend-mode/mix-blend-mode-plus-lighter.html
  • FAIL [expected PASS] /css/css-backgrounds/background-size-042.html
  • OK /css/css-cascade/layer-cssom-order-reverse.html (#36094)
    • FAIL [expected PASS] subtest: Delete layer invalidates @font-face

      assert_equals: expected "220px" but got "133px"
      

  • OK /css/css-fonts/generic-family-keywords-002.html (#40929)
    • FAIL [expected PASS] subtest: font-family: -webkit-serif treated as <font-family>, not <generic-name>

      assert_equals: expected 30 but got 50
      

    • FAIL [expected PASS] subtest: font-family: -webkit-sans-serif treated as <font-family>, not <generic-name>

      assert_equals: expected 30 but got 50
      

    • FAIL [expected PASS] subtest: font-family: -webkit-cursive treated as <font-family>, not <generic-name>

      assert_equals: expected 30 but got 50
      

    • FAIL [expected PASS] subtest: font-family: -webkit-fantasy treated as <font-family>, not <generic-name>

      assert_equals: expected 30 but got 50
      

    • FAIL [expected PASS] subtest: font-family: -webkit-monospace treated as <font-family>, not <generic-name>

      assert_equals: expected 30 but got 50
      

    • FAIL [expected PASS] subtest: font-family: -webkit-system-ui treated as <font-family>, not <generic-name>

      assert_equals: expected 30 but got 50
      

    • FAIL [expected PASS] subtest: font-family: -webkit-math treated as <font-family>, not <generic-name>

      assert_equals: expected 30 but got 50
      

    • PASS [expected FAIL] subtest: font-family: -webkit-generic(fangsong) treated as <font-family>, not <generic-name>
    • PASS [expected FAIL] subtest: font-family: -webkit-generic(kai) treated as <font-family>, not <generic-name>
    • PASS [expected FAIL] subtest: font-family: -webkit-generic(khmer-mul) treated as <font-family>, not <generic-name>
    • And 12 more unexpected results...
  • OK [expected ERROR] /fetch/fetch-later/quota/same-origin-iframe/sandboxed-iframe.https.window.html (#41704)
  • OK /fetch/metadata/generated/css-font-face.sub.tentative.html (#34624)
    • PASS [expected FAIL] subtest: sec-fetch-storage-access - Not sent to non-trustworthy same-site destination
    • PASS [expected FAIL] subtest: sec-fetch-storage-access - Not sent to non-trustworthy cross-site destination
  • OK /fetch/metadata/window-open.https.sub.html (#40339)
    • FAIL [expected PASS] subtest: Same-site window, forced, reloaded

      The operation is insecure.
      

  • 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/history/the-history-interface/traverse_the_history_5.html (#21383)
    • PASS [expected FAIL] subtest: Multiple history traversals, last would be aborted
  • CRASH [expected OK] /html/browsers/the-window-object/window-open-noopener.html?_top
  • OK /html/semantics/document-metadata/the-meta-element/pragma-directives/attr-meta-http-equiv-refresh/allow-scripts-flag-changing-1.html (#39694)
    • PASS [expected FAIL] subtest: Meta refresh is blocked by the allow-scripts sandbox flag at its creation time, not when refresh comes due
  • TIMEOUT [expected OK] /html/semantics/embedded-content/the-iframe-element/iframe_sandbox_navigate_other_frame_popup.sub.html (#39702)
    • TIMEOUT [expected FAIL] subtest: Sandboxed iframe can not navigate other frame's popup

      Test timed out
      

  • 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.
  • CRASH [expected ERROR] /html/semantics/forms/the-select-element/customizable-select/select-appearance-button-after-span.html
  • OK /html/semantics/scripting-1/the-script-element/module/dynamic-import/blob-url.any.worker.html (#33909)
    • FAIL [expected PASS] subtest: Revoking a blob URL immediately after calling import will not fail

      promise_test: Unhandled rejection with value: object "TypeError: Module fetching failed"
      

  • TIMEOUT [expected OK] /html/user-activation/navigation-state-reset-sameorigin.html
    • TIMEOUT [expected PASS] 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"])
      

  • PASS [expected FAIL] /png/apng/acTL-plays-one.html (#41218)
  • TIMEOUT [expected OK] /preload/modulepreload-sri.html (#43354)
    • TIMEOUT [expected PASS] subtest: Script should not be loaded if modulepreload's integrity is invalid

      Test timed out
      

  • OK /resource-timing/test_resource_timing.https.html (#25216)
    • PASS [expected FAIL] subtest: PerformanceEntry has correct name, initiatorType, startTime, and duration (xmlhttprequest)
  • OK /touch-events/single-tap-when-touchend-listener-use-sync-xhr.html (#41175)
    • FAIL [expected PASS] subtest: Click event should be fired when touchend opens synchronous XHR

      assert_equals: expected "touchend@div, mousedown@div, mouseup@div, click@div" but got "touchend@div"
      

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

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

  • OK /webdriver/tests/classic/accept_alert/accept.py (#43194)
    • FAIL [expected PASS] subtest: test_accept_in_popup_window

      AssertionError: no such alert (404): No user prompt is currently active.
      

  • OK /webdriver/tests/classic/execute_async_script/promise.py
    • FAIL [expected PASS] subtest: test_promise_resolve

      AssertionError: no such window (404): No such window
      

  • OK /webdriver/tests/classic/get_element_attribute/get.py
    • ERROR [expected PASS] subtest: test_no_top_browsing_context

      setup error: webdriver.error.NoSuchElementException: no such element (404)
      

  • OK [expected TIMEOUT] /webstorage/localstorage-about-blank-3P-iframe-opens-3P-window.partitioned.html (#29053)
    • PASS [expected TIMEOUT] subtest: StorageKey: test 3P about:blank window opened from a 3P iframe
  • CRASH [expected OK] /webxr/xrSession_sameObject.https.html
  • ERROR [expected OK] /workers/baseurl/alpha/sharedworker-in-worker.html (#21315)
Stable unexpected results that are known to be intermittent (13)
  • OK /_mozilla/css/offset_properties_inline.html (#40543)
    • FAIL [expected PASS] subtest: offsetTop

      assert_equals: offsetTop of #inline-1 should be 0. expected 0 but got -1
      

    • FAIL [expected PASS] subtest: offsetLeft

      assert_equals: offsetLeft of #inline-2 should be 40. expected 40 but got 25
      

  • FAIL [expected PASS] /_mozilla/mozilla/sslfail.html (#10760)
  • TIMEOUT [expected OK] /_mozilla/mozilla/window_resize_event.html (#36741)
    • TIMEOUT [expected PASS] subtest: Popup onresize event fires after resizeTo

      Test timed out
      

  • CRASH [expected OK] /content-security-policy/meta/sandbox-iframe.html (#43478)
  • TIMEOUT [expected OK] /credential-management/credentialscontainer-frame-basics.https.html (#39430)
    • TIMEOUT [expected FAIL] subtest: navigator.credentials should be undefined in documents generated from data: URLs.

      Test timed out
      

  • OK /css/css-fonts/generic-family-keywords-001.html (#37467)
    • PASS [expected FAIL] subtest: @font-face matching for quoted and unquoted generic(fangsong)
  • OK /css/css-fonts/generic-family-keywords-003.html (#38994)
    • FAIL [expected PASS] subtest: @font-face matching for quoted and unquoted cursive (drawing text in a canvas)

      assert_equals: quoted cursive matches  @font-face rule expected 125 but got 40
      

    • PASS [expected FAIL] subtest: @font-face matching for quoted and unquoted math (drawing text in a canvas)
    • PASS [expected FAIL] subtest: @font-face matching for quoted and unquoted generic(fangsong) (drawing text in a canvas)
    • PASS [expected FAIL] subtest: @font-face matching for quoted and unquoted generic(kai) (drawing text in a canvas)
    • PASS [expected FAIL] subtest: @font-face matching for quoted and unquoted generic(khmer-mul) (drawing text in a canvas)
    • PASS [expected FAIL] subtest: @font-face matching for quoted and unquoted ui-serif (drawing text in a canvas)
  • OK /html/browsers/browsing-the-web/navigating-across-documents/005.html (#27062)
    • FAIL [expected PASS] subtest: Link with onclick navigation and href navigation

      assert_equals: expected "href" but got "click"
      

  • OK /html/browsers/history/the-history-interface/traverse_the_history_4.html (#21383)
    • PASS [expected FAIL] subtest: Multiple history traversals, last would be aborted
  • OK [expected TIMEOUT] /html/interaction/focus/the-autofocus-attribute/supported-elements.html (#24145)
    • PASS [expected TIMEOUT] subtest: Non-HTMLElement should not support autofocus
    • FAIL [expected NOTRUN] subtest: Host element with delegatesFocus should support autofocus

      assert_equals: expected Element node <div autofocus=""></div> but got Element node <body><div autofocus=""></div></body>
      

    • FAIL [expected NOTRUN] subtest: Host element with delegatesFocus including no focusable descendants should be skipped

      assert_equals: expected Element node <input autofocus=""></input> but got Element node <body><div autofocus=""></div><input autofocus=""></body>
      

    • FAIL [expected NOTRUN] subtest: Area element should support autofocus

      promise_test: Unhandled rejection with value: object "TypeError: can't access property "appendChild", w.document.querySelector(...) is null"
      

  • OK /html/semantics/embedded-content/media-elements/audio_loop_seek_to_eos.html (#41226)
    • PASS [expected FAIL] subtest: seeking to the end of looping audio
  • OK /resource-timing/test_resource_timing.html (#25720)
    • PASS [expected FAIL] subtest: PerformanceEntry has correct name, initiatorType, startTime, and duration (img)
  • TIMEOUT /trusted-types/trusted-types-navigation.html?31-35 (#38034)
    • TIMEOUT [expected PASS] subtest: Navigate a frame via form-submission with javascript:-urls in report-only mode.

      Test timed out
      

    • NOTRUN [expected TIMEOUT] subtest: Navigate a frame via form-submission with javascript:-urls w/ default policy in report-only mode.
Stable unexpected results (1)
  • ERROR /fetch/fetch-later/quota/cross-origin-iframe/empty-payload.https.window.html
    • FAIL [expected PASS] subtest: fetchLater() accepts a non-empty POST request body of String in a default cross-origin iframe.

      iframe[src=https://not-web-platform.test:8443/fetch/fetch-later/resources/fetch-later.html?url=%252Ffetch%252Ffetch-later%252Fresources%252Fset_beacon.py%253Fuuid%253D2d54c8bc-5dd5-42cf-ad4a-09f1d718e45a&activateAfter=0&method=POST&bodyType=String&bodySize=0] threw QuotaExceededError, expected no error
      

    • FAIL [expected PASS] subtest: fetchLater() accepts a non-empty POST request body of ArrayBuffer in a default cross-origin iframe.

      iframe[src=https://not-web-platform.test:8443/fetch/fetch-later/resources/fetch-later.html?url=%252Ffetch%252Ffetch-later%252Fresources%252Fset_beacon.py%253Fuuid%253Dc6ebef10-fb12-4c23-8203-3a1148cea3c6&activateAfter=0&method=POST&bodyType=ArrayBuffer&bodySize=0] threw QuotaExceededError, expected no error
      

    • FAIL [expected PASS] subtest: fetchLater() accepts a non-empty POST request body of URLSearchParams in a default cross-origin iframe.

      iframe[src=https://not-web-platform.test:8443/fetch/fetch-later/resources/fetch-later.html?url=%252Ffetch%252Ffetch-later%252Fresources%252Fset_beacon.py%253Fuuid%253D94f00cd2-ef66-4579-b3e1-6441b57544b0&activateAfter=0&method=POST&bodyType=URLSearchParams&bodySize=0] threw QuotaExceededError, expected no error
      

    • FAIL [expected PASS] subtest: fetchLater() accepts a non-empty POST request body of Blob in a default cross-origin iframe.

      iframe[src=https://not-web-platform.test:8443/fetch/fetch-later/resources/fetch-later.html?url=%252Ffetch%252Ffetch-later%252Fresources%252Fset_beacon.py%253Fuuid%253D20ddfd27-6fd8-4bbe-815b-9aab784745f3&activateAfter=0&method=POST&bodyType=Blob&bodySize=0] threw QuotaExceededError, expected no error
      

    • FAIL [expected PASS] subtest: fetchLater() accepts a non-empty POST request body of File in a default cross-origin iframe.

      iframe[src=https://not-web-platform.test:8443/fetch/fetch-later/resources/fetch-later.html?url=%252Ffetch%252Ffetch-later%252Fresources%252Fset_beacon.py%253Fuuid%253D5c4a7e28-f5b5-4d66-8f9d-3e0b14baf17f&activateAfter=0&method=POST&bodyType=File&bodySize=0] threw QuotaExceededError, expected no error
      

@github-actions
Copy link
Copy Markdown

⚠️ Try run (#23506718119) failed!

Per the spec discussion in [1] we should only check for a length
of `null` and not zero.

[1]: whatwg/fetch#1902

Signed-off-by: Tim van der Lippe <[email protected]>
@TimvdLippe TimvdLippe force-pushed the update-fetch-later-empty-request branch from 21c19de to 979a8cd Compare March 24, 2026 20:51
@servo-wpt-sync
Copy link
Copy Markdown
Collaborator

📝 Transplanted new upstreamable changes to existing upstream WPT pull request (web-platform-tests/wpt#58726).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants