Skip to content

Rename original window_resizeTo.html to window_resize_event.html & Fix wrong usage of innerHeight & add new test#37856

Merged
jdm merged 1 commit intoservo:mainfrom
yezhizhen:fix-test
Jul 4, 2025
Merged

Rename original window_resizeTo.html to window_resize_event.html & Fix wrong usage of innerHeight & add new test#37856
jdm merged 1 commit intoservo:mainfrom
yezhizhen:fix-test

Conversation

@yezhizhen
Copy link
Copy Markdown
Member

@yezhizhen yezhizhen commented Jul 3, 2025

  1. rename original window_resizeTo.html to window_resize_event.html to reflect the purpose. Also change {innerWidth, innerHeight} to {outerWidth, outerHeight} to match spec.
  2. Add a new test window_resizeTo.html for servoshell: Make fn request_resize resize window w.r.t. outer_size accurately #37848

Testing: new test always fails because of #37824, which gives inaccurate outerHeight.

@yezhizhen yezhizhen requested a review from Loirooriol July 3, 2025 16:35
@yezhizhen yezhizhen changed the title Fix wrong test & add new Fix wrong usage of innerHeight in window_resizeTo.html & add new test Jul 3, 2025
@yezhizhen yezhizhen requested review from Taym95 and xiaochengh July 3, 2025 16:36
@yezhizhen yezhizhen added the T-linux-wpt Do a try run of the WPT label Jul 3, 2025
@github-actions github-actions bot removed the T-linux-wpt Do a try run of the WPT label Jul 3, 2025
@github-actions
Copy link
Copy Markdown

github-actions bot commented Jul 3, 2025

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

@github-actions
Copy link
Copy Markdown

github-actions bot commented Jul 3, 2025

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

Flaky unexpected result (19)
  • TIMEOUT /FileAPI/url/url-in-tags-revoke.window.html (#19978)
    • TIMEOUT [expected PASS] subtest: Fetching a blob URL immediately before revoking it works in <script> tags.

      Test timed out
      

  • OK /FileAPI/url/url-with-fetch.any.worker.html (#21517)
    • FAIL [expected PASS] subtest: Revoke blob URL after calling fetch, fetch should succeed

      promise_test: Unhandled rejection with value: object "TypeError: Network error occurred"
      

  • OK /css/css-cascade/layer-cssom-order-reverse.html (#36094)
    • FAIL [expected PASS] subtest: Insert layer invalidates @font-face

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

  • 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-style: 'oblique -20deg' should prefer 'oblique -10deg' over 'oblique 0deg'

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

  • FAIL [expected PASS] /css/css-sizing/dynamic-available-size-iframe.html (#31559)
  • TIMEOUT [expected OK] /fetch/api/redirect/redirect-keepalive.https.any.html (#32153)
    • TIMEOUT [expected PASS] subtest: [keepalive][iframe][load] mixed content redirect; setting up

      Test timed out
      

  • OK /html/browsers/browsing-the-web/navigating-across-documents/008.html (#24456)
    • PASS [expected FAIL] subtest: Link with onclick form submit to javascript url and href navigation
  • OK /html/browsers/browsing-the-web/navigating-across-documents/javascript-url-return-value-handling-dynamic.html (#28066)
    • FAIL [expected PASS] subtest: 0041 set in href="" targeting a frame and clicked

      assert_equals: expected "A" but got ""
      

    • FAIL [expected PASS] subtest: 0080 00FF set in href="" targeting a frame and clicked

      assert_equals: expected "�ÿ" but got ""
      

    • FAIL [expected PASS] subtest: 0080 00FF 0100 set in href="" targeting a frame and clicked

      assert_equals: expected "�ÿĀ" but got ""
      

    • FAIL [expected PASS] subtest: D83D DE0D set in href="" targeting a frame and clicked

      assert_equals: expected "😍" but got ""
      

    • FAIL [expected PASS] subtest: DE0D 0041 set in href="" targeting a frame and clicked

      assert_equals: expected "\ufffdA" but got ""
      

  • 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_3.html (#21383)
    • PASS [expected FAIL] subtest: Multiple history traversals, last would be aborted
  • OK /html/browsers/history/the-history-interface/traverse_the_history_4.html (#21383)
    • PASS [expected FAIL] subtest: Multiple history traversals, last would be aborted
  • PASS [expected FAIL] /html/canvas/element/manual/text/canvas.2d.disconnected.html (#30063)
  • TIMEOUT [expected OK] /html/infrastructure/urls/base-url/document-base-url-window-initiator-is-not-opener.https.window.html (#30970)
  • TIMEOUT [expected OK] /html/interaction/focus/the-autofocus-attribute/document-with-fragment-nonexistent.html (#28259)
    • TIMEOUT [expected FAIL] subtest: Autofocus elements in top-level browsing context's documents with non-existent fragments should work.

      Test timed out
      

  • CRASH [expected TIMEOUT] /html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_escaping-2.html (#22667)
  • OK /navigation-timing/test-navigation-type-reload.html (#33334)
    • PASS [expected FAIL] subtest: Reload domComplete > Original domComplete
    • PASS [expected FAIL] subtest: Reload domContentLoadedEventEnd > Original domContentLoadedEventEnd
    • PASS [expected FAIL] subtest: Reload loadEventEnd > Original loadEventEnd
    • PASS [expected FAIL] subtest: Reload loadEventStart > Original loadEventStart
  • OK /resize-observer/eventloop.html (#33599)
    • FAIL [expected PASS] subtest: test0: multiple notifications inside same event loop

      assert_equals: new loop expected 1 but got 0
      

  • OK [expected TIMEOUT] /webmessaging/with-ports/017.html (#24486)
    • PASS [expected TIMEOUT] subtest: origin of the script that invoked the method, about:blank
  • TIMEOUT [expected OK] /webstorage/localstorage-about-blank-3P-iframe-opens-3P-window.partitioned.html (#29053)
    • TIMEOUT [expected PASS] subtest: StorageKey: test 3P about:blank window opened from a 3P iframe

      Test timed out
      

Stable unexpected results that are known to be intermittent (18)
  • FAIL [expected PASS] /_mozilla/mozilla/sslfail.html (#10760)
  • OK /_mozilla/mozilla/window_resizeTo.html (#36741)
    • PASS [expected FAIL] subtest: Correctly resize outerWidth and outerHeight
  • 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.
  • FAIL [expected PASS] /css/css-grid/grid-items/grid-auto-margin-and-replaced-item-001.html (#37162)
  • OK /fetch/metadata/generated/css-font-face.https.sub.tentative.html (#32732)
    • PASS [expected FAIL] subtest: sec-fetch-dest
    • PASS [expected FAIL] subtest: sec-fetch-storage-access - Cross-site
  • OK /fetch/metadata/generated/css-font-face.sub.tentative.html (#34624)
    • FAIL [expected PASS] subtest: sec-fetch-storage-access - Not sent to non-trustworthy cross-site destination

      promise_test: Unhandled rejection with value: object "Error: Failed to query for recorded headers."
      

  • OK /html/browsers/browsing-the-web/navigating-across-documents/initial-empty-document/load-pageshow-events-iframe-contentWindow.html (#28681)
    • PASS [expected FAIL] subtest: load & pageshow events do not fire on contentWindow of <iframe> element created with src=''
    • PASS [expected FAIL] subtest: load & pageshow events do not fire on contentWindow of <iframe> element created with src='about:blank'
  • 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/browsers/history/the-history-interface/traverse_the_history_5.html (#21383)
    • FAIL [expected PASS] subtest: Multiple history traversals, last would be aborted

      assert_array_equals: Pages opened during history navigation expected property 1 to be 5 but got 3 (expected array [6, 5] got [6, 3])
      

  • OK [expected TIMEOUT] /html/interaction/focus/the-autofocus-attribute/supported-elements.html (#24145)
    • PASS [expected NOTRUN] 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></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: w.document.querySelector(...) is null"
      

  • TIMEOUT [expected OK] /html/interaction/focus/the-autofocus-attribute/update-the-rendering.html (#24145)
    • TIMEOUT [expected FAIL] subtest: "Flush autofocus candidates" should be happen before a scroll event and animation frame callbacks

      Test timed out
      

  • OK [expected TIMEOUT] /html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_escaping-3.html (#24057)
    • FAIL [expected TIMEOUT] subtest: Check that popups from a sandboxed iframe escape the sandbox if allow-popups-to-escape-sandbox is used

      assert_equals: It came from a sandboxed iframe expected "null" but got "http://web-platform.test:8000"
      

  • CRASH [expected TIMEOUT] /html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_nonescaping-1.html (#24066)
  • OK [expected TIMEOUT] /html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_nonescaping-2.html (#22154)
  • OK [expected TIMEOUT] /html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_nonescaping-3.html (#24066)
  • OK /preload/preload-error.sub.html (#37177)
    • FAIL [expected PASS] subtest: 404 (style): main

      assert_greater_than: http://web-platform.test:8000/preload/resources/dummy.css?pipe=status%28404%29&label=style should be loaded expected a number greater than 0 but got 0
      

    • PASS [expected FAIL] subtest: CORS (style): main
    • FAIL [expected PASS] subtest: Decode-error (style): main

      assert_greater_than: http://web-platform.test:8000/preload/resources/dummy.xml?pipe=header%28Content-Type%2Ctext%2Fcss%29&label=style should be loaded expected a number greater than 0 but got 0
      

    • PASS [expected FAIL] subtest: MIME-error (script): main
  • TIMEOUT [expected OK] /resource-timing/nested-context-navigations-iframe.html (#24311)
    • TIMEOUT [expected PASS] subtest: Test that crossorigin iframe navigations are not observable by the parent, even after history navigations by the parent

      Test timed out
      

    • NOTRUN [expected PASS] subtest: Test that cross-site iframe navigations are not observable by the parent, even after history navigations by the parent
    • NOTRUN [expected PASS] subtest: Test that iframe navigations are not observable by the parent
    • NOTRUN [expected PASS] subtest: Test that crossorigin iframe navigations are not observable by the parent
    • NOTRUN [expected PASS] subtest: Test that cross-site iframe navigations are not observable by the parent
    • NOTRUN [expected PASS] subtest: Test that iframe refreshes are not observable by the parent
    • NOTRUN [expected PASS] subtest: Test that crossorigin iframe refreshes are not observable by the parent
    • NOTRUN [expected PASS] subtest: Test that cross-site iframe refreshes are not observable by the parent
  • OK [expected ERROR] /workers/constructors/Worker/Worker-constructor.html (#22991)
Stable unexpected results (1)
  • TIMEOUT [expected OK] /_mozilla/mozilla/window_resize_event.html
    • TIMEOUT [expected PASS] subtest: Popup onresize event fires after resizeTo

      Test timed out
      

@github-actions
Copy link
Copy Markdown

github-actions bot commented Jul 3, 2025

⚠️ Try run (#16055950363) failed.

Signed-off-by: Euclid Ye <[email protected]>
@yezhizhen
Copy link
Copy Markdown
Member Author

yezhizhen commented Jul 4, 2025

Failure is because we renamed the original file, which very often fail to fire "onresize". I believe we need to rename the Intermittent issue #36741 right before adding this to MQ?

@yezhizhen yezhizhen changed the title Fix wrong usage of innerHeight in window_resizeTo.html & add new test Rename original window_resizeTo.html to window_resize_event.html & Fix wrong usage of innerHeight & add new test Jul 4, 2025
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.

What's the purpose of this new test?

A test case for resizeTo without relying on the resize event? I'm not sure if we really need that.

Copy link
Copy Markdown
Member Author

@yezhizhen yezhizhen Jul 4, 2025

Choose a reason for hiding this comment

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

A test case for resizeTo without relying on the resize event?

Yes, for #37848, since the original test very often not getting resize event and this test in mozilla is specific to servo so I just added one.

It will be easier to track if we really fixed #37824 later.

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 see, thanks.

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 see, thanks.

github-merge-queue bot pushed a commit that referenced this pull request Jul 4, 2025
…accurately (#37848)

`toolbar_height` is already part of `inner_size`, caused wrongly
calculated `outer_size`. Even worse, it tried to `request_inner_size`
with the already wrong `outer_size`.

This PR make sure resize is accurate by first calculate the title/border
height, and then compute the `inner_size` for `request_inner_size`. This
is necessary because no direct `request_outer_size` is available.

Testing: As manually tested, set window size WebDriver command no longer
overshoot. This is also shared by
[window.resizeTo](https://drafts.csswg.org/cssom-view/#dom-window-resizeto)
JS method. WPT test would be necessary. (But that one is intermittent
TIMEOUT. So created new one in
#37856)
 
WebDriver test will be postponed after
web-platform-tests/wpt#53421 is merged and
synced to Servo.

Fixes: Task 3 of #37804

---------

Signed-off-by: Euclid Ye <[email protected]>
@jdm
Copy link
Copy Markdown
Member

jdm commented Jul 4, 2025

I've added the new test name to #36741 and we can update the title after it merges. That will avoid preventing other PRs from merging in the meantime.

@jdm jdm added this pull request to the merge queue Jul 4, 2025
Merged via the queue into servo:main with commit a81ddd5 Jul 4, 2025
23 checks passed
@yezhizhen yezhizhen deleted the fix-test branch July 4, 2025 16:37
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.

3 participants