Skip to content

Conversation

@lukewarlow
Copy link
Contributor

Add CommandEvent

This is behind the new dom_command_invokers_enabled pref.

Testing: Existing WPTs

@lukewarlow lukewarlow requested a review from gterzian as a code owner November 4, 2025 22:39
@servo-highfive servo-highfive added the S-awaiting-review There is new code that needs to be reviewed. label Nov 4, 2025
Copy link
Member

@Taym95 Taym95 left a comment

Choose a reason for hiding this comment

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

needs lint fix🚀

@servo-highfive servo-highfive added S-awaiting-review There is new code that needs to be reviewed. and removed S-awaiting-review There is new code that needs to be reviewed. labels Nov 4, 2025
@jdm jdm added this pull request to the merge queue Nov 5, 2025
@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 5, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Nov 5, 2025
@servo-highfive servo-highfive added S-tests-failed The changes caused existing tests to fail. and removed S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. labels Nov 5, 2025
@lukewarlow
Copy link
Contributor Author

Hmm none of these test failures occur locally with a debug nor release build. What's the best approach to take here?

@Taym95
Copy link
Member

Taym95 commented Nov 5, 2025

Hmm none of these test failures occur locally with a debug nor release build. What's the best approach to take here?

Looks like new intermittent test, what are these tests?

@lukewarlow
Copy link
Contributor Author

It's testing command and commandfor on disallowed elements to make sure it's not accidentally supported anywhere else (I guess?). But it's relying on testdriver and test variants so that bit is probably failing. Is there a way to skip the whole test file for now?

@yezhizhen yezhizhen added the T-linux-wpt Do a try run of the WPT label Nov 8, 2025
@github-actions github-actions bot removed the T-linux-wpt Do a try run of the WPT label Nov 8, 2025
@github-actions
Copy link

github-actions bot commented Nov 8, 2025

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

@github-actions
Copy link

github-actions bot commented Nov 8, 2025

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

Flaky unexpected result (43)
  • OK /IndexedDB/idbfactory_open.any.html
    • FAIL [expected PASS] subtest: Calling open() with version argument 1.5 should not throw.

      assert_equals: version expected 1 but got 9007199254740991
      

  • OK /_mozilla/webxr/create_session.https.html
    • FAIL [expected PASS] subtest: create_session

      can't access property "simulateDeviceConnection", navigator.xr.test is undefined
      

  • OK /_mozilla/webxr/obtain_frame.https.html
    • FAIL [expected PASS] subtest: obtain_frame

      promise_test: Unhandled rejection with value: object "TypeError: can't access property "simulateDeviceConnection", navigator.xr.test is undefined"
      

  • ERROR [expected TIMEOUT] /_mozilla/webxr/sessionavailable.https.html
  • CRASH [expected ERROR] /_webgl/conformance/extensions/oes-texture-float-with-canvas.html
  • CRASH [expected OK] /_webgl/conformance/ogles/GL/struct/struct_001_to_008.html
  • CRASH [expected OK] /_webgl/conformance/ogles/GL/swizzlers/swizzlers_033_to_040.html
  • CRASH [expected OK] /_webgl/conformance/renderbuffers/renderbuffer-initialization.html
  • CRASH [expected OK] /_webgl/conformance/textures/image_bitmap_from_image/tex-2d-rgba-rgba-unsigned_short_5_5_5_1.html
  • CRASH [expected OK] /_webgl/conformance2/context/context-type-test-2.html
  • CRASH [expected OK] /_webgl/conformance2/glsl3/attrib-location-length-limits.html
  • 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 OK] /credential-management/idlharness.https.window.html
  • FAIL [expected PASS] /css/css-backgrounds/background-size-042.html
  • FAIL [expected PASS] /css/css-backgrounds/border-image-repeat-space-9.html
  • OK /css/css-fonts/generic-family-keywords-001.html (#37467)
    • PASS [expected FAIL] subtest: @font-face matching for quoted and unquoted generic(kai)
    • PASS [expected FAIL] subtest: @font-face matching for quoted and unquoted generic(nastaliq)
  • CRASH [expected OK] /css/css-pseudo/highlight-cascade/highlight-cascade-010.html
  • OK /custom-elements/form-associated/ElementInternals-setFormValue.html (#29174)
    • PASS [expected FAIL] subtest: Single value - empty name exists
    • PASS [expected FAIL] subtest: Single value - Non-empty name exists
  • OK /fetch/fetch-later/new-window.https.window.html (#32036)
    • FAIL [expected PASS] subtest: A same-origin window[target=''][features=''] can trigger fetchLater.

      assert_equals: Number of sent beacons does not match expected count: expected 1 but got 0
      

    • FAIL [expected PASS] subtest: A same-origin window[target=''][features='popup'] can trigger fetchLater.

      assert_equals: Number of sent beacons does not match expected count: expected 1 but got 0
      

    • FAIL [expected PASS] subtest: A same-origin window[target='_blank'][features=''] can trigger fetchLater.

      assert_equals: Number of sent beacons does not match expected count: expected 1 but got 0
      

    • FAIL [expected PASS] subtest: A same-origin window[target='_blank'][features='popup'] can trigger fetchLater.

      assert_equals: Number of sent beacons does not match expected count: expected 1 but got 0
      

  • TIMEOUT /fetch/metadata/generated/css-images.sub.tentative.html (#29047)
    • TIMEOUT [expected PASS] subtest: background-image sec-fetch-dest - Not sent to non-trustworthy cross-site destination

      Test timed out
      

  • TIMEOUT [expected CRASH] /html/anonymous-iframe/indexeddb.tentative.https.window.html (#39254)
  • OK /html/browsers/browsing-the-web/navigating-across-documents/008.html (#24456)
    • FAIL [expected PASS] subtest: Link with onclick form submit to javascript url and href navigation

      assert_equals: expected "href" but got "click"
      

  • OK /html/browsers/browsing-the-web/navigating-across-documents/navigation-unload-cross-origin.sub.window.html (#29056)
    • PASS [expected FAIL] subtest: Cross-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"
      

  • 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"
      

  • CRASH [expected OK] /html/browsers/the-windowproxy-exotic-object/windowproxy-define-own-property-unforgeable-same-origin.html
  • CRASH [expected OK] /html/dom/elements/global-attributes/dir-bdi-script.html
  • 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
      

  • TIMEOUT [expected OK] /html/semantics/embedded-content/the-iframe-element/sandbox-inherit-to-blank-document-unsandboxed.html
    • TIMEOUT [expected PASS] subtest: Popup do not inherit sandbox, because of 'allow-popups-to-escape-sandbox' the document doesn't inherit CSP. The document isn't sandboxed

      Test timed out
      

  • 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"])
      

  • 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: Dynamic import failed"
      

  • FAIL [expected PASS] /png/apng/fcTL-dispose-previous.html
  • CRASH [expected OK] /trusted-types/eval-function-constructor.html
  • OK [expected TIMEOUT] /trusted-types/trusted-types-navigation.html?06-10 (#37920)
    • PASS [expected TIMEOUT] subtest: Navigate a frame via anchor with javascript:-urls w/ default policy in report-only mode.
    • FAIL [expected NOTRUN] subtest: Navigate a window via anchor with javascript:-urls w/ a default policy throwing an exception in enforcing mode.

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

    • FAIL [expected NOTRUN] subtest: Navigate a window via anchor with javascript:-urls w/ a default policy throwing an exception in report-only mode.

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

  • CRASH [expected OK] /trusted-types/trusted-types-reporting-for-Document-execCommand.html
  • CRASH [expected OK] /wasm/webapi/esm-integration/worklet-import-source-phase.tentative.https.html
  • CRASH [expected OK] /webaudio/the-audio-api/the-audiobuffersourcenode-interface/ctor-audiobuffersource.html
  • OK /webdriver/tests/classic/element_click/events.py
    • FAIL [expected PASS] subtest: test_event_mousemove

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

  • OK /webdriver/tests/classic/element_click/select.py
    • FAIL [expected PASS] subtest: test_click_multiple_option

      assert not True
      

  • OK /webdriver/tests/classic/execute_script/properties.py
    • FAIL [expected PASS] subtest: test_content_attribute

      AssertionError: javascript error (500): can't access property "value", input is null
      

  • CRASH [expected OK] /websockets/unload-a-document/003.html
  • 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
      

  • ERROR [expected OK] /workers/baseurl/alpha/sharedworker-in-worker.html (#21315)
Stable unexpected results that are known to be intermittent (30)
  • OK /IndexedDB/idbcursor-continuePrimaryKey-exceptions.any.worker.html (#39277)
    • FAIL [expected PASS] subtest: IDBCursor continuePrimaryKey() on object store cursor

      assert_throws_dom: continuePrimaryKey() should throw if source is not an index function "function() {
              cursor.continuePrimaryKey(2, 2);
            }" threw object "TypeError: cursor.continuePrimaryKey is not a function" that is not a DOMException InvalidAccessError: property "code" is equal to undefined, expected 15
      

  • OK /IndexedDB/idbobjectstore_getAll.any.html (#39276)
    • PASS [expected FAIL] subtest: Get all values with transaction.commit()
  • OK /IndexedDB/idbobjectstore_getAll.any.worker.html (#39400)
    • PASS [expected FAIL] subtest: Get all values with transaction.commit()
  • OK /IndexedDB/key-conversion-exceptions.any.html (#39305)
    • FAIL [expected PASS] subtest: IDBCursor continue() method with throwing/invalid keys

      assert_throws_exactly: key conversion with throwing getter should rethrow function "() => {
            receiver[method](key);
          }" threw object "TypeError: receiver[method] is not a function" but we expected it to throw object "getter: throwing from getter"
      

  • OK /IndexedDB/key-conversion-exceptions.any.worker.html (#39284)
    • FAIL [expected PASS] subtest: IDBCursor continue() method with throwing/invalid keys

      assert_throws_exactly: key conversion with throwing getter should rethrow function "() => {
            receiver[method](key);
          }" threw object "TypeError: receiver[method] is not a function" but we expected it to throw object "getter: throwing from getter"
      

    • FAIL [expected PASS] subtest: IDBCursor update() method with throwing/invalid keys

      assert_throws_exactly: throwing getter should rethrow during clone function "() => {
            cursor.update(value);
          }" threw object "TypeError: cursor.update is not a function" but we expected it to throw object "getter: throwing from getter"
      

  • OK /_mozilla/mozilla/FileAPI/file-upload.html (#40348)
    • FAIL [expected PASS] subtest: form submission of uploaded file

      assert_equals: expected "OK" but got "\n\n\n\n\n    var fileInput = document.getElementById(\"file-input\");\n    fileInput.addEventListener(\"change\", () => {\n      parent.postMessage(\"loadedAndFilesChanged\");\n    });\n    fileInput.selectFiles([\"./tests/wpt/mozilla/tests/mozilla/FileAPI/resource/upload.txt\"]);\n\n"
      

  • 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
      

  • 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-003.html (#38994)
    • PASS [expected FAIL] subtest: @font-face matching for quoted and unquoted system-ui (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 generic(nastaliq) (drawing text in a canvas)
    • PASS [expected FAIL] subtest: @font-face matching for quoted and unquoted ui-monospace (drawing text in a canvas)
  • OK /custom-elements/form-associated/form-disabled-callback.html (#38843)
    • PASS [expected FAIL] subtest: A disabled form-associated custom element should not submit an entry for it
  • FAIL [expected TIMEOUT] /dom/xslt/large-cdata.html (#38029)
  • OK /fetch/metadata/generated/css-font-face.sub.tentative.html (#34624)
    • PASS [expected FAIL] subtest: sec-fetch-storage-access - Not sent to non-trustworthy cross-site destination
  • TIMEOUT [expected CRASH] /fetch/metadata/window-open.https.sub.html (#40339)
  • 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)
    • FAIL [expected TIMEOUT] subtest: Element with tabindex should support autofocus

      assert_equals: expected "SPAN" but got "BODY"
      

    • 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><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"
      

  • TIMEOUT [expected OK] /html/semantics/embedded-content/media-elements/src_object_blob.html (#40340)
    • TIMEOUT [expected PASS] subtest: HTMLMediaElement.srcObject blob

      Test timed out
      

  • OK /html/semantics/embedded-content/the-video-element/intrinsic_sizes.htm (#40457)
    • FAIL [expected PASS] subtest: default object size after src is removed

      assert_equals: expected "300px" but got "320px"
      

  • OK /html/semantics/forms/form-submission-0/multipart-formdata.window.html (#28725)
    • PASS [expected FAIL] subtest: multipart/form-data: Basic test (normal form)
    • PASS [expected FAIL] subtest: multipart/form-data: 0x00 in name (formdata event)
    • PASS [expected FAIL] subtest: multipart/form-data: \r\n in value (normal form)
    • PASS [expected FAIL] subtest: multipart/form-data: double quote in value (normal form)
  • OK /html/semantics/forms/form-submission-0/text-plain.window.html (#28687)
    • PASS [expected FAIL] subtest: text/plain: Basic test (normal form)
    • PASS [expected FAIL] subtest: text/plain: Basic test (formdata event)
    • PASS [expected FAIL] subtest: text/plain: Basic File test (normal form)
    • PASS [expected FAIL] subtest: text/plain: Basic File test (formdata event)
    • PASS [expected FAIL] subtest: text/plain: 0x00 in value (formdata event)
    • PASS [expected FAIL] subtest: text/plain: single quote in name (normal form)
  • OK /html/semantics/forms/form-submission-0/urlencoded2.window.html (#28687)
    • PASS [expected FAIL] subtest: application/x-www-form-urlencoded: Basic test (normal form)
  • OK /html/semantics/forms/historical.html (#28568)
    • PASS [expected FAIL] subtest: <input name=isindex> should not be supported
  • TIMEOUT [expected OK] /html/semantics/interactive-elements/the-details-element/name-attribute.html (#40355)
  • TIMEOUT [expected ERROR] /html/semantics/links/links-created-by-a-and-area-elements/target_blank_implicit_noopener_base.html (#40347)
  • OK /preload/preload-error.sub.html (#37177)
    • PASS [expected FAIL] subtest: CORS (fetch): main
  • OK /trusted-types/trusted-types-navigation.html?01-05 (#38975)
    • FAIL [expected PASS] subtest: Navigate a window via anchor with javascript:-urls in report-only mode.

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

  • OK /trusted-types/trusted-types-navigation.html?26-30 (#38807)
    • PASS [expected FAIL] subtest: Navigate a frame via form-submission with javascript:-urls in enforcing mode.
  • TIMEOUT [expected OK] /trusted-types/trusted-types-navigation.html?31-35 (#38034)
    • TIMEOUT [expected PASS] subtest: Navigate a frame via form-submission with javascript:-urls w/ default policy in report-only mode.

      Test timed out
      

    • NOTRUN [expected FAIL] subtest: Navigate a window via form-submission with javascript:-urls w/ a default policy throwing an exception in enforcing mode.
    • NOTRUN [expected FAIL] subtest: Navigate a window via form-submission with javascript:-urls w/ a default policy throwing an exception in report-only mode.
    • NOTRUN [expected FAIL] subtest: Navigate a window via form-submission with javascript:-urls w/ a default policy making the URL invalid in enforcing mode.
  • CRASH [expected ERROR] /webxr/render_state_update.https.html (#27535)
Stable unexpected results (3)
  • OK [expected ERROR] /html/semantics/the-button-element/command-and-commandfor/invalid-element-types.html?command=--custom-event&half=second
  • OK [expected ERROR] /html/semantics/the-button-element/command-and-commandfor/invalid-element-types.html?command=show-modal&half=second
  • OK [expected ERROR] /html/semantics/the-button-element/command-and-commandfor/invalid-element-types.html?command=show-popover&half=second

@github-actions
Copy link

github-actions bot commented Nov 8, 2025

⚠️ Try run (#19184823390) failed.

@yezhizhen
Copy link
Member

It's testing command and commandfor on disallowed elements to make sure it's not accidentally supported anywhere else (I guess?). But it's relying on testdriver and test variants so that bit is probably failing. Is there a way to skip the whole test file for now?

It is actually stably passing. Just update those expectation.

@Taym95
Copy link
Member

Taym95 commented Nov 20, 2025

It's testing command and commandfor on disallowed elements to make sure it's not accidentally supported anywhere else (I guess?). But it's relying on testdriver and test variants so that bit is probably failing. Is there a way to skip the whole test file for now?

just saw this sorry, check this to skip:

[cookies]

@jdm
Copy link
Member

jdm commented Nov 20, 2025

Please don't use include.ini to skip individual test files. Use .ini metadata files for that instead:

disabled: enormous number of timeouts

This is behind the new dom_command_invokers_enabled pref.

Signed-off-by: Luke Warlow <lwarlow@igalia.com>
Signed-off-by: Luke Warlow <lwarlow@igalia.com>
Signed-off-by: Luke Warlow <lwarlow@igalia.com>
@servo-highfive servo-highfive removed the S-tests-failed The changes caused existing tests to fail. label Nov 21, 2025
@servo-highfive servo-highfive removed the S-awaiting-review There is new code that needs to be reviewed. label Nov 24, 2025
@TimvdLippe TimvdLippe added this pull request to the merge queue Nov 24, 2025
@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 24, 2025
github-merge-queue bot pushed a commit that referenced this pull request Nov 24, 2025
Add CommandEvent

This is behind the new dom_command_invokers_enabled pref.

Testing: Existing WPTs

---------

Signed-off-by: Luke Warlow <lwarlow@igalia.com>
Merged via the queue into servo:main with commit 64a3abf Nov 24, 2025
32 checks passed
@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 24, 2025
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.

6 participants