Skip to content

webdriver: Wait for the browsing context when switching windows - #50150

Merged
yezhizhen merged 1 commit into
servo:mainfrom
yezhizhen:wd-int
Nov 23, 2026
Merged

yezhizhen merged 1 commit into
servo:mainfrom
yezhizhen:wd-int

Conversation

@yezhizhen

Copy link
Copy Markdown
Member

When a webview exists, the browsing context may still be pending to be activated/created, as we've seen in #49817.

Testing: Tested locally.
Fixes: Part of #47582: test_link_from_toplevel_context_with_target[_blank] - webdriver.error.NoSuchWindowException: no such window (404), which opens a new webview from click.

@servo-highfive servo-highfive added the S-awaiting-review There is new code that needs to be reviewed. label Nov 23, 2026
@yezhizhen yezhizhen added the T-linux-wpt Do a try run of the WPT label Nov 23, 2026
@github-actions github-actions Bot removed the T-linux-wpt Do a try run of the WPT label Nov 23, 2026
@github-actions

Copy link
Copy Markdown

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

@servo-highfive servo-highfive removed the S-awaiting-review There is new code that needs to be reviewed. label Nov 23, 2026
@github-actions

Copy link
Copy Markdown

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

Flaky unexpected result (17)
  • CRASH [expected OK] /IndexedDB/idbindex-query-exception-order.any.sharedworker.html
  • OK /css/CSS2/floats/floats-in-inline-content-intrinsic-size-001.html (#49728)
    • FAIL [expected PASS] subtest: An empty float next to text (emptyFloatAndText, min-content)

      assert_equals: expected 70 but got 50
      

  • OK /dom/nodes/moveBefore/iframe-document-preserve.window.html (#43152)
    • FAIL [expected PASS] subtest: moveBefore(): cross-origin iframe is preserved: remove self

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

  • OK /fetch/content-length/api-and-duplicate-headers.any.worker.html (#35197)
    • FAIL [expected PASS] subtest: fetch() and duplicate Content-Length/Content-Type headers

      promise_test: Unhandled rejection with value: object "TypeError: Network error: HTTP failure: client error (SendRequest)"
      

  • OK [expected TIMEOUT] /html/browsers/browsing-the-web/navigating-across-documents/cross-origin-top-navigation-with-user-activation-in-parent.window.html (#48205)
    • FAIL [expected TIMEOUT] subtest: Cross-origin top navigation is blocked without user activation, even if the parent has user activation

      assert_equals: expected "Denied" but got "Allowed"
      

  • OK /html/browsers/browsing-the-web/navigating-across-documents/initial-empty-document/iframe-src-204.html (#48879)
    • FAIL [expected PASS] subtest: Navigating to a different document with location.assign

      The operation is insecure.
      

  • 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
  • TIMEOUT [expected ERROR] /html/browsers/history/the-location-interface/location_replace_session_history.html (#41896)
  • TIMEOUT [expected PASS] /html/semantics/document-metadata/the-link-element/link-error-handler-triggers-abort-crash.html (#49503)
  • OK /html/semantics/forms/the-input-element/selection-pointer.html
    • FAIL [expected PASS] subtest: Selecting texts across <input type=button> should not cancel selection

      assert_equals: anchorNode expected Text node "foo" but got Element node <span id="foo">foo</span>
      

  • CRASH [expected FAIL] /html/semantics/forms/the-select-element/customizable-select/select-appearance-button-after-span.html
  • 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 (#47688)
    • FAIL [expected PASS] subtest: TestDriver click on a document in an iframe

      Unhandled rejection: assert_unreached: click failed Reached unreachable code
      

  • OK /infrastructure/testdriver/click_window.html (#47303)
    • FAIL [expected PASS] subtest: TestDriver click method in window

      Unhandled rejection: assert_unreached: click failed Reached unreachable code
      

  • OK /upgrade-insecure-requests/gen/sharedworker-classic-data.meta/upgrade/websocket.https.html
    • FAIL [expected PASS] subtest: Upgrade-Insecure-Requests: Expects allowed for websocket to cross-ws-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 websocket to same-ws-downgrade origin and no-redirect redirection from https context.

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

  • TIMEOUT [expected OK] /webdriver/tests/classic/element_click/center_point.py
Stable unexpected results that are known to be intermittent (11)
  • 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 /css/CSS2/floats/float-in-block-in-inline-position-001.html (#49534)
    • FAIL [expected PASS] subtest: A line after a bordered block containing a float avoids it at the block's position (sibling)

      assert_equals: the line's block-axis position expected 108 but got 106.35000000000002
      

  • OK /css/CSS2/visudet/inline-block-baseline-with-block-in-inline-001.html (#49559)
    • FAIL [expected PASS] subtest: An inline-block whose last line box holds a block level box exports that line's baseline

      assert_equals: the text after the inline-block is aligned to the inline-block's last line box baseline expected 20 but got 18.35
      

  • TIMEOUT /html/browsers/history/the-history-interface/001.html (#12580)
    • FAIL [expected PASS] subtest: traversing history must also traverse hash changes

      assert_equals: (this could cause other failures later on) expected "" but got "test"
      

  • OK /html/semantics/embedded-content/media-elements/playing-the-media-resource/fragmented-mp4-end.html (#48349)
    • FAIL [expected PASS] subtest: fragmented-mp4-end

      assert_equals: Expected seeked event, but got error event instead expected "seeked" but got "error"
      

  • OK /html/semantics/embedded-content/media-elements/playing-the-media-resource/loop-from-ended.tentative.html (#33778)
    • FAIL [expected PASS] subtest: play() with loop set to true after playback ended

      assert_true: ended at ended event expected true got false
      

  • OK [expected ERROR] /html/semantics/forms/the-input-element/show-picker-does-not-focus.html (#50054)
  • PASS [expected FAIL] /mathml/presentation-markup/operators/operator-dictionary-empty-and-three-chars.html (#49173)
  • ERROR [expected TIMEOUT] /performance-timeline/not-restored-reasons/abort-block-bfcache.window.html (#42802)
  • OK /pointerevents/pointerevent_pointercapture_in_frame.html?pen (#45536)
    • PASS [expected FAIL] subtest: Test penpointer capture in same-origin frame: Pointer down at inner frame and set pointer capture.
    • PASS [expected FAIL] subtest: Test penpointer capture in same-origin frame: Pointer down at inner frame and set pointer capture to outer frame should not capture.
  • OK /preload/prefetch-document.html (#37210)
    • PASS [expected FAIL] subtest: different-site document prefetch with 'as=document' should not be consumed
Stable unexpected results (1)
  • TIMEOUT [expected OK] /pointerevents/compat/pointerevent_touch-action_two-finger_interaction.html
    • 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'

@github-actions

Copy link
Copy Markdown

⚠️ Try run (#45166779983) failed!

@servo-highfive servo-highfive added the S-awaiting-review There is new code that needs to be reviewed. label Nov 23, 2026
@yezhizhen
yezhizhen enabled auto-merge November 23, 2026 13:43
@yezhizhen
yezhizhen disabled auto-merge November 23, 2026 13:51
@yezhizhen
yezhizhen disabled auto-merge November 23, 2026 13:51
@yezhizhen
yezhizhen disabled auto-merge November 23, 2026 13:51
@yezhizhen

Copy link
Copy Markdown
Member Author

TIMEOUT [expected OK] /pointerevents/compat/pointerevent_touch-action_two-finger_interaction.html

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'

I can reproduce this before this PR.

@yezhizhen
yezhizhen added this pull request to the merge queue Nov 23, 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 Nov 23, 2026
Merged via the queue into servo:main with commit 1bb0d55 Nov 23, 2026
38 checks passed
@yezhizhen
yezhizhen deleted the wd-int branch November 23, 2026 15:37
@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 Nov 23, 2026
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.

3 participants