Skip to content

svg: Add mock SVGImageElement interface#36975

Merged
jdm merged 1 commit intoservo:mainfrom
tharkum:mock-svgimageelement-interface
May 13, 2025
Merged

svg: Add mock SVGImageElement interface#36975
jdm merged 1 commit intoservo:mainfrom
tharkum:mock-svgimageelement-interface

Conversation

@tharkum
Copy link
Copy Markdown
Contributor

@tharkum tharkum commented May 12, 2025

Add mock SVGImageElement interface to fix TIMEOUT WPT tests
which are related to ImageBitmap (html/canvas/*).
https://svgwg.org/svg2-draft/embedded.html#InterfaceSVGImageElement

Rationality of this change to fire event "error" on any attempt to fetch
image resource on href attribute change to not block WPT tests execution.

Some WPT tests use the legacy namespace attribute "xlink:href", so support for it was added to source code.
https://svgwg.org/svg2-draft/linking.html#XLinkHrefAttribute

Testing: Covered by existed WPT tests

  • fetch/metadata/generated/svg-image*
  • html/canvas/element/manual/*
  • html/dom/idlharness.https.html
  • html/semantics/embedded-content/the-canvas-element/*
  • html/webappapis/scripting/events/event-handler-all-global-events.html
  • mozilla/interfaces.https.html

Fixes: #35881

@tharkum tharkum requested a review from gterzian as a code owner May 12, 2025 11:32
@tharkum
Copy link
Copy Markdown
Contributor Author

tharkum commented May 12, 2025

NOTE: There are some unstable WPT testing results because of HTMLVideoElement media player event handling (no "canplaythrough" event sometimes on my local PC), and I have TIMEOUT results (instead of FAILED) for some tests.
So if someone can run CI WPT Linux tests, I be able to update WTP metadata results.

cc @xiaochengh

@jdm jdm added the T-linux-wpt Do a try run of the WPT label May 12, 2025
@github-actions github-actions bot removed the T-linux-wpt Do a try run of the WPT label May 12, 2025
@github-actions
Copy link
Copy Markdown

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

@tharkum
Copy link
Copy Markdown
Contributor Author

tharkum commented May 12, 2025

May be related issues : #34119, #32745

Copy link
Copy Markdown
Member

@jdm jdm left a comment

Choose a reason for hiding this comment

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

I'm fine with these changes, but I'd like to have a plan for using the new layout data or removing the code that's involved with it.

owner.will_mutate_attr(self);
self.swap_value(&mut value);
if *self.namespace() == ns!() {
if *self.namespace() == ns!() ||
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.

Let's move this logic into a helper function so we don't duplicate this check everywhere.

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.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

is_trusted_attribute(namespace, local_name) will be ok?

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.

How about is_relevant_attribute? Trusted makes me think of Trusted Types.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Done

fn fetch_image_resource(&self, can_gc: CanGc) {
// TODO: Process and fetch the image resource (as HTMLImageElement).
// Reject any resource fetching request immediately.
self.upcast::<EventTarget>()
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.

Let's queue a task for this, rather than doing it synchronously.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Like ?

        self.owner_global()
            .task_manager()
            .dom_manipulation_task_source()
            .queue_simple_event(self.upcast(), atom!("error"));

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.

Yep!

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Done

this.svg_data()
}

fn svg_image_data(&self) -> Option<SVGImageData> {
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.

This isn't actually called anywhere right now. Are you planning to add that in a followup?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Actually no plans to implement it.
I just copy-pasted all stuff from SVGSVGElement to make it the same as much as possible (BTW svg_data also doesn't use anywhere)

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.

Ok, then let's remove the attribute parsing and new traits.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Done

@github-actions
Copy link
Copy Markdown

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

Flaky unexpected result (20)
  • TIMEOUT [expected OK] /_webgl/conformance/uniforms/out-of-bounds-uniform-array-access.html (#26225)
    • NOTRUN [expected PASS] subtest: Overall test
  • OK /css/css-fonts/variations/at-font-face-font-matching.html (#20684)
    • PASS [expected FAIL] subtest: Matching font-style: 'oblique 0deg' should prefer 'oblique -40deg -30deg' over 'italic'
  • FAIL [expected PASS] /css/css-tables/table-cell-overflow-auto-scrolled.html (#35011)
  • OK /fetch/content-length/api-and-duplicate-headers.any.html (#35873)
    • FAIL [expected PASS] subtest: fetch() and duplicate Content-Length/Content-Type headers

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

  • OK [expected ERROR] /fetch/fetch-later/quota/cross-origin-iframe/small-payload.tentative.https.window.html
  • 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-origin destination
  • ERROR /fetch/metadata/generated/serviceworker.https.sub.html (#36247)
    • PASS [expected FAIL] subtest: sec-fetch-site - Same origin, no options - registration
  • OK /html/browsers/browsing-the-web/overlapping-navigations-and-traversals/cross-document-nav-cross-document-nav.html (#29181)
    • PASS [expected FAIL] subtest: cross-document navigation then cross-document navigation
  • TIMEOUT [expected OK] /html/canvas/element/manual/imagebitmap/createImageBitmap-origin.sub.html (#31931)
    • TIMEOUT [expected FAIL] subtest: redirected to same-origin HTMLVideoElement: origin unclear getImageData

      Test timed out
      

    • NOTRUN [expected FAIL] subtest: redirected to same-origin HTMLVideoElement: origin unclear 2dContext.drawImage
    • NOTRUN [expected FAIL] subtest: redirected to same-origin HTMLVideoElement: origin unclear bitmaprenderer.transferFromImageBitmap
    • NOTRUN [expected FAIL] subtest: unclean HTMLCanvasElement: origin unclear getImageData
    • NOTRUN [expected FAIL] subtest: unclean HTMLCanvasElement: origin unclear 2dContext.drawImage
    • NOTRUN [expected FAIL] subtest: unclean HTMLCanvasElement: origin unclear bitmaprenderer.transferFromImageBitmap
    • NOTRUN [expected FAIL] subtest: unclean ImageBitmap: origin unclear getImageData
    • NOTRUN [expected FAIL] subtest: unclean ImageBitmap: origin unclear 2dContext.drawImage
    • NOTRUN [expected FAIL] subtest: unclean ImageBitmap: origin unclear bitmaprenderer.transferFromImageBitmap
  • TIMEOUT [expected OK] /html/canvas/element/manual/imagebitmap/createImageBitmap-serializable.html (#34120)
    • TIMEOUT [expected FAIL] subtest: Serialize ImageBitmap created from an HTMLVideoElement from a data URL

      Test timed out
      

    • NOTRUN [expected FAIL] subtest: Serialize ImageBitmap created from a bitmap HTMLImageElement
    • NOTRUN [expected FAIL] subtest: Serialize ImageBitmap created from a vector HTMLImageElement
    • NOTRUN [expected FAIL] subtest: Serialize ImageBitmap created from a bitmap SVGImageElement
    • NOTRUN [expected FAIL] subtest: Serialize ImageBitmap created from a vector SVGImageElement
    • NOTRUN [expected FAIL] subtest: Serialize ImageBitmap created from an OffscreenCanvas
    • NOTRUN [expected FAIL] subtest: Serialize ImageBitmap created from an ImageData
    • NOTRUN [expected FAIL] subtest: Serialize ImageBitmap created from an ImageBitmap
    • NOTRUN [expected FAIL] subtest: Serialize ImageBitmap created from a Blob
    • NOTRUN [expected FAIL] subtest: Serializing a non-origin-clean ImageBitmap throws.
  • ERROR [expected OK] /html/canvas/element/manual/imagebitmap/createImageBitmap-transfer.html (#34119)
  • TIMEOUT [expected OK] /html/interaction/focus/the-autofocus-attribute/autofocus-dialog.html (#29087)
    • TIMEOUT [expected FAIL] subtest: &lt;dialog&gt;-contained autofocus element gets focused when the dialog is shown

      Test timed out
      

  • 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 OK] /html/semantics/embedded-content/media-elements/seeking/seek-to-max-value.htm
  • OK /html/semantics/embedded-content/the-iframe-element/iframe-loading-lazy-reload-location-reload.html (#32595)
    • FAIL [expected PASS] subtest: Reloading iframe loading='lazy' before it is loaded: location.reload

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

  • OK /html/semantics/forms/form-submission-0/form-submit-iframe-then-location-navigate.html (#29634)
    • PASS [expected FAIL] subtest: Verifies that location navigations take precedence when following form submissions.
  • OK /html/semantics/forms/form-submission-0/multipart-formdata.window.html (#28725)
    • PASS [expected FAIL] subtest: multipart/form-data: 0x00 in name (normal form)
  • OK /html/semantics/forms/form-submission-0/text-plain.window.html (#28687)
    • PASS [expected FAIL] subtest: text/plain: Basic test (normal form)
  • OK [expected TIMEOUT] /performance-timeline/navigation-id-detached-frame.tentative.html (#34773)
    • PASS [expected TIMEOUT] subtest: The navigation_id getter does not crash a window of detached frame
  • 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 (12)
  • OK /_webgl/conformance/textures/misc/texture-upload-size.html (#21770)
    • FAIL [expected PASS] subtest: WebGL test #44

      assert_true: could not create image (SVG) expected true got false
      

  • 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-user
    • PASS [expected FAIL] subtest: sec-fetch-storage-access - Cross-site
  • OK /html/browsers/browsing-the-web/navigating-across-documents/initial-empty-document/iframe-nosrc.html (#34819)
    • FAIL [expected PASS] subtest: form submission

      assert_equals: expected "http://web-platform.test:8000/common/blank.html?1=" but got "about:blank"
      

  • OK /html/browsers/history/the-history-interface/traverse_the_history_3.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 3 but got 2 (expected array [6, 3] got [6, 2])
      

  • PASS [expected FAIL] /html/canvas/element/manual/text/canvas.2d.disconnected.html (#30063)
  • TIMEOUT /html/interaction/focus/the-autofocus-attribute/supported-elements.html (#24145)
    • TIMEOUT [expected FAIL] subtest: Contenteditable element should support autofocus

      Test timed out
      

    • NOTRUN [expected FAIL] subtest: Element with tabindex should support autofocus
    • NOTRUN [expected PASS] subtest: Non-HTMLElement should not support autofocus
  • OK [expected TIMEOUT] /html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_escaping-1.html (#22647)
    • 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"
      

  • TIMEOUT [expected OK] /html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_nonescaping-3.html (#24066)
    • NOTRUN [expected FAIL] subtest: Check that popups from a sandboxed iframe do not escape the sandbox
  • OK /navigation-timing/test-navigation-type-reload.html (#33334)
    • PASS [expected FAIL] subtest: Reload domComplete &gt; Original domComplete
    • PASS [expected FAIL] subtest: Reload domContentLoadedEventEnd &gt; Original domContentLoadedEventEnd
    • PASS [expected FAIL] subtest: Reload domContentLoadedEventStart &gt; Original domContentLoadedEventStart
    • PASS [expected FAIL] subtest: Reload domInteractive &gt; Original domInteractive
    • PASS [expected FAIL] subtest: Reload fetchStart &gt; Original fetchStart
  • OK /webaudio/the-audio-api/the-audiobuffersourcenode-interface/sub-sample-buffer-stitching.html (#22849)
    • FAIL [expected PASS] subtest: X Stitched sine-wave buffers at sample rate 43800 does not equal [0,0.06264832615852356,0.12505052983760834,0.18696144223213196,0.24813786149024963,0.308339387178421,0.36732959747314453,0.4248766601085663,0.480754554271698,0.5347436666488647,0.5866320133209229,0.6362156271934509,0.6832997798919678,0.7276994585990906,0.7692402601242065,0.8077589869499207...] with an element-wise tolerance of {"absoluteThreshold":0.0038986,"relativeThreshold":0}. Index Actual Expected AbsError RelError Test threshold [14650] -2.9408268000000000e+7 8.6956524848937988e-1 2.9408268869565248e+7 3.3819507990520179e+7 3.8985999999999999e-3 [14651] 3.0547976493835449e-1 8.9879405498504639e-1 5.9331429004669189e-1 6.6012262403823208e-1 3.8985999999999999e-3 Max AbsError of 2.9408268869565248e+7 at index of 14650. Max RelError of 3.3819507990520179e+7 at index of 14650.

      assert_true: expected true got false
      

    • FAIL [expected PASS] subtest: X SNR (-105.93530326250482 dB) is not greater than or equal to 65.737. Got -105.93530326250482.

      assert_true: expected true got false
      

  • OK [expected ERROR] /webxr/render_state_update.https.html (#27535)
  • ERROR [expected OK] /workers/constructors/Worker/Worker-constructor.html (#22991)
Stable unexpected results (4)
  • OK /_mozilla/mozilla/interfaces.https.html
    • FAIL [expected PASS] subtest: Interfaces exposed on the window

      assert_true: If this is failing: DANGER, are you sure you want to expose the new interface SVGImageElement to all webpages as a property on the global? expected true got false
      

  • OK /html/dom/idlharness.https.html?exclude=(Document|Window|HTML.+)
    • PASS [expected FAIL] subtest: SVGElement interface: attribute onabort
    • PASS [expected FAIL] subtest: SVGElement interface: attribute onauxclick
    • PASS [expected FAIL] subtest: SVGElement interface: attribute onbeforeinput
    • PASS [expected FAIL] subtest: SVGElement interface: attribute onbeforematch
    • PASS [expected FAIL] subtest: SVGElement interface: attribute onbeforetoggle
    • PASS [expected FAIL] subtest: SVGElement interface: attribute onblur
    • PASS [expected FAIL] subtest: SVGElement interface: attribute oncancel
    • PASS [expected FAIL] subtest: SVGElement interface: attribute oncanplay
    • PASS [expected FAIL] subtest: SVGElement interface: attribute oncanplaythrough
    • PASS [expected FAIL] subtest: SVGElement interface: attribute onchange
    • And 66 more unexpected results...
  • TIMEOUT [expected OK] /html/semantics/embedded-content/the-canvas-element/security.pattern.fillStyle.sub.html
    • TIMEOUT [expected FAIL] subtest: redirected to cross-origin HTMLVideoElement: Setting fillStyle to an origin-unclean offscreen canvas pattern makes the canvas origin-unclean

      Test timed out
      

    • NOTRUN [expected FAIL] subtest: redirected to same-origin HTMLVideoElement: Setting fillStyle to an origin-unclean offscreen canvas pattern makes the canvas origin-unclean
    • NOTRUN [expected PASS] subtest: unclean HTMLCanvasElement: Setting fillStyle to an origin-unclean offscreen canvas pattern makes the canvas origin-unclean
    • NOTRUN [expected FAIL] subtest: unclean ImageBitmap: Setting fillStyle to an origin-unclean offscreen canvas pattern makes the canvas origin-unclean
  • OK /html/webappapis/scripting/events/event-handler-all-global-events.html
    • PASS [expected FAIL] subtest: onabort: must be on the appropriate locations for GlobalEventHandlers
    • PASS [expected FAIL] subtest: onabort: the default value must be null
    • PASS [expected FAIL] subtest: onauxclick: must be on the appropriate locations for GlobalEventHandlers
    • PASS [expected FAIL] subtest: onauxclick: the default value must be null
    • PASS [expected FAIL] subtest: onbeforeinput: must be on the appropriate locations for GlobalEventHandlers
    • PASS [expected FAIL] subtest: onbeforeinput: the default value must be null
    • PASS [expected FAIL] subtest: onbeforematch: must be on the appropriate locations for GlobalEventHandlers
    • PASS [expected FAIL] subtest: onbeforematch: the default value must be null
    • PASS [expected FAIL] subtest: onbeforetoggle: must be on the appropriate locations for GlobalEventHandlers
    • PASS [expected FAIL] subtest: onbeforetoggle: the default value must be null
    • And 140 more unexpected results...

@github-actions
Copy link
Copy Markdown

⚠️ Try run (#14971404913) failed.

@tharkum tharkum force-pushed the mock-svgimageelement-interface branch from 63edb69 to 01693d2 Compare May 12, 2025 13:57
@tharkum
Copy link
Copy Markdown
Contributor Author

tharkum commented May 12, 2025

@jdm < Please pay attention what this change unblock one crash (yep!).
tests/wpt/tests/html/canvas/element/manual/imagebitmap/createImageBitmap-invalid-args.html

 0:03.33 pid:2693624 memory allocation of 40000000000000000 bytes failed
 0:03.33 pid:2693624 Redirecting call to abort() to mozalloc_abort
 0:03.33 pid:2693624 
 0:03.33 pid:2693624 Caught signal 11 in thread "Script(1,1)"

@tharkum tharkum force-pushed the mock-svgimageelement-interface branch from 01693d2 to 295e912 Compare May 12, 2025 18:19
@jdm jdm enabled auto-merge May 12, 2025 18:30
@jdm jdm added this pull request to the merge queue May 12, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks May 12, 2025
@tharkum
Copy link
Copy Markdown
Contributor Author

tharkum commented May 12, 2025

In summary

Add mock SVGImageElement interface to fix TIMEOUT WPT tests
which are related to ImageBitmap (html/canvas/*).
https://svgwg.org/svg2-draft/embedded.html#InterfaceSVGImageElement

Rationality of this change to fire event "error" on any attempt to fetch
image resource on href attribute change to not block WPT tests execution.

Some WPT tests use the legacy namespace attribute "xlink:href",
so support for it was added to source code.
https://svgwg.org/svg2-draft/linking.html#XLinkHrefAttribute
 - setAttributeNS("http://www.w3.org/1999/xlink", 'xlink:href', src);

Testing: Covered by existed WPT tests
 - fetch/metadata/generated/svg-image*
 - html/canvas/element/manual/*
 - html/dom/idlharness.https.html
 - html/semantics/embedded-content/the-canvas-element/*
 - html/webappapis/scripting/events/event-handler-all-global-events.html
 - mozilla/interfaces.https.html

Fixes: servo#35881

Signed-off-by: Andrei Volykhin <[email protected]>
@tharkum tharkum force-pushed the mock-svgimageelement-interface branch from 295e912 to ed84f16 Compare May 12, 2025 20:55
@tharkum
Copy link
Copy Markdown
Contributor Author

tharkum commented May 12, 2025

@jdm < Please add "T-linux-wpt" label to have WPT results before any attempt to merge PR.

@jdm jdm added the T-linux-wpt Do a try run of the WPT label May 12, 2025
@github-actions github-actions bot removed the T-linux-wpt Do a try run of the WPT label May 12, 2025
@github-actions
Copy link
Copy Markdown

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

@github-actions
Copy link
Copy Markdown

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

Flaky unexpected result (19)
  • 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"
      

  • TIMEOUT [expected OK] /_webgl/conformance/renderbuffers/depth-renderbuffer-initialization.html (#26232)
  • PASS [expected FAIL] /css/compositing/mix-blend-mode/mix-blend-mode-video-sibling.html (#32849)
  • PASS [expected FAIL] /css/compositing/mix-blend-mode/mix-blend-mode-video.html (#32763)
  • FAIL [expected PASS] /css/css-overflow/overflow-video.html (#34720)
  • PASS [expected FAIL] /css/css-position/sticky/position-sticky-top-002.html (#35412)
  • OK /fetch/content-length/api-and-duplicate-headers.any.html (#35873)
    • FAIL [expected PASS] subtest: fetch() and duplicate Content-Length/Content-Type headers

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

  • OK /fetch/private-network-access/worker-blob-fetch.tentative.window.html (#30064)
    • PASS [expected FAIL] subtest: local https to local https: success.
  • 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
  • TIMEOUT [expected OK] /html/browsers/browsing-the-web/navigating-across-documents/anchor-fragment-form-submit.html
  • TIMEOUT [expected OK] /html/browsers/browsing-the-web/navigating-across-documents/initial-empty-document/iframe-src-aboutblank-navigate-immediately.html (#29048)
    • TIMEOUT [expected PASS] subtest: Navigating to a different document with link click

      Test timed out
      

    • NOTRUN [expected PASS] subtest: Navigating to a different document with form submission
  • TIMEOUT [expected OK] /html/interaction/focus/the-autofocus-attribute/autofocus-dialog.html (#29087)
    • TIMEOUT [expected FAIL] subtest: &lt;dialog&gt;-contained autofocus element gets focused when the dialog is shown

      Test timed out
      

  • CRASH [expected TIMEOUT] /html/semantics/embedded-content/media-elements/track/track-element/track-cues-sorted-before-dispatch.html
  • OK [expected TIMEOUT] /html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_escaping-1.html (#22647)
    • 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"
      

  • OK [expected TIMEOUT] /html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_nonescaping-2.html (#22154)
    • FAIL [expected NOTRUN] subtest: Check that popups from a sandboxed iframe do not escape the sandbox

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

  • OK /html/semantics/forms/form-submission-0/urlencoded2.window.html (#28687)
    • PASS [expected FAIL] subtest: application/x-www-form-urlencoded: single quote in value (formdata event)
  • TIMEOUT /mixed-content/gen/top.http-rp/opt-in/audio-tag.https.html (#35744)
    • TIMEOUT [expected PASS] subtest: Mixed-Content: Expects allowed for audio-tag to same-https origin and keep-scheme redirection from https context.

      Test timed out
      

    • NOTRUN [expected PASS] subtest: Mixed-Content: Expects allowed for audio-tag to same-https origin and no-redirect redirection from https context.
    • NOTRUN [expected TIMEOUT] subtest: Mixed-Content: Expects blocked for audio-tag to cross-http origin and keep-scheme redirection from https context.
  • 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
      

  • OK [expected ERROR] /webxr/render_state_update.https.html (#27535)
Stable unexpected results that are known to be intermittent (11)
  • TIMEOUT [expected OK] /_mozilla/mozilla/window_resizeTo.html (#36741)
    • TIMEOUT [expected PASS] subtest: Popup onresize event fires after resizeTo

      Test timed out
      

  • FAIL [expected PASS] /css/css-tables/table-cell-overflow-auto-scrolled.html (#35011)
  • OK /html/browsers/browsing-the-web/navigating-across-documents/009.html (#24456)
    • FAIL [expected PASS] subtest: Link with onclick form submit to javascript url with document.write and href navigation

      assert_array_equals: expected property 1 to be "href" but got "click" (expected array ["write", "href"] got ["write", "click"])
      

  • OK /html/browsers/history/the-history-interface/traverse_the_history_3.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 3 but got 1 (expected array [6, 3] got [6, 1])
      

  • OK [expected TIMEOUT] /html/canvas/element/manual/imagebitmap/createImageBitmap-origin.sub.html (#31931)
  • TIMEOUT /html/interaction/focus/the-autofocus-attribute/supported-elements.html (#24145)
    • TIMEOUT [expected FAIL] subtest: Contenteditable element should support autofocus

      Test timed out
      

    • NOTRUN [expected FAIL] subtest: Element with tabindex should support autofocus
    • NOTRUN [expected PASS] subtest: Non-HTMLElement should not support autofocus
  • 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/iframe_sandbox_popups_nonescaping-3.html (#24066)
    • NOTRUN [expected FAIL] subtest: Check that popups from a sandboxed iframe do not escape the sandbox
  • OK /navigation-timing/test-navigation-type-reload.html (#33334)
    • PASS [expected FAIL] subtest: Reload domComplete &gt; Original domComplete
    • PASS [expected FAIL] subtest: Reload domContentLoadedEventEnd &gt; Original domContentLoadedEventEnd
    • PASS [expected FAIL] subtest: Reload domContentLoadedEventStart &gt; Original domContentLoadedEventStart
    • PASS [expected FAIL] subtest: Reload domInteractive &gt; Original domInteractive
    • PASS [expected FAIL] subtest: Reload fetchStart &gt; Original fetchStart
  • OK [expected TIMEOUT] /performance-timeline/navigation-id-detached-frame.tentative.html (#34773)
    • PASS [expected TIMEOUT] subtest: The navigation_id getter does not crash a window of detached frame
  • OK /webaudio/the-audio-api/the-audiobuffersourcenode-interface/sub-sample-buffer-stitching.html (#22849)
    • FAIL [expected PASS] subtest: X Stitched sine-wave buffers at sample rate 43800 does not equal [0,0.06264832615852356,0.12505052983760834,0.18696144223213196,0.24813786149024963,0.308339387178421,0.36732959747314453,0.4248766601085663,0.480754554271698,0.5347436666488647,0.5866320133209229,0.6362156271934509,0.6832997798919678,0.7276994585990906,0.7692402601242065,0.8077589869499207...] with an element-wise tolerance of {"absoluteThreshold":0.0038986,"relativeThreshold":0}. Index Actual Expected AbsError RelError Test threshold [14650] 4.9320038917734400e+14 8.6956524848937988e-1 4.9320038917734313e+14 5.6718042726999188e+14 3.8985999999999999e-3 [14651] 3.0547976493835449e-1 8.9879405498504639e-1 5.9331429004669189e-1 6.6012262403823208e-1 3.8985999999999999e-3 Max AbsError of 4.9320038917734313e+14 at index of 14650. Max RelError of 5.6718042726999188e+14 at index of 14650.

      assert_true: expected true got false
      

    • FAIL [expected PASS] subtest: X SNR (-250.4263822683434 dB) is not greater than or equal to 65.737. Got -250.4263822683434.

      assert_true: expected true got false
      

Stable unexpected results (1)
  • OK [expected TIMEOUT] /html/semantics/embedded-content/the-canvas-element/security.pattern.fillStyle.sub.html
    • FAIL [expected TIMEOUT] subtest: redirected to same-origin HTMLVideoElement: Setting fillStyle to an origin-unclean pattern makes the canvas origin-unclean

      promise_test: Unhandled rejection with value: object "TypeError: argument could not be converted to any of: HTMLImageElement, HTMLCanvasElement, OffscreenCanvas, CSSStyleValue"
      

    • PASS [expected NOTRUN] subtest: unclean HTMLCanvasElement: Setting fillStyle to an origin-unclean pattern makes the canvas origin-unclean
    • FAIL [expected NOTRUN] subtest: unclean ImageBitmap: Setting fillStyle to an origin-unclean pattern makes the canvas origin-unclean

      promise_test: Unhandled rejection with value: object "NotSupportedError: The operation is not supported."
      

    • PASS [expected NOTRUN] subtest: cross-origin HTMLImageElement: Setting fillStyle to an origin-unclean offscreen canvas pattern makes the canvas origin-unclean
    • FAIL [expected NOTRUN] subtest: cross-origin SVGImageElement: Setting fillStyle to an origin-unclean offscreen canvas pattern makes the canvas origin-unclean

      promise_test: Unhandled rejection with value: object "[object Event]"
      

    • FAIL [expected NOTRUN] subtest: cross-origin HTMLVideoElement: Setting fillStyle to an origin-unclean offscreen canvas pattern makes the canvas origin-unclean

      promise_test: Unhandled rejection with value: object "TypeError: argument could not be converted to any of: HTMLImageElement, HTMLCanvasElement, OffscreenCanvas, CSSStyleValue"
      

    • FAIL [expected NOTRUN] subtest: redirected to cross-origin HTMLVideoElement: Setting fillStyle to an origin-unclean offscreen canvas pattern makes the canvas origin-unclean

      promise_test: Unhandled rejection with value: object "TypeError: argument could not be converted to any of: HTMLImageElement, HTMLCanvasElement, OffscreenCanvas, CSSStyleValue"
      

    • FAIL [expected NOTRUN] subtest: redirected to same-origin HTMLVideoElement: Setting fillStyle to an origin-unclean offscreen canvas pattern makes the canvas origin-unclean

      promise_test: Unhandled rejection with value: object "TypeError: argument could not be converted to any of: HTMLImageElement, HTMLCanvasElement, OffscreenCanvas, CSSStyleValue"
      

    • PASS [expected NOTRUN] subtest: unclean HTMLCanvasElement: Setting fillStyle to an origin-unclean offscreen canvas pattern makes the canvas origin-unclean
    • FAIL [expected NOTRUN] subtest: unclean ImageBitmap: Setting fillStyle to an origin-unclean offscreen canvas pattern makes the canvas origin-unclean

      promise_test: Unhandled rejection with value: object "NotSupportedError: The operation is not supported."
      

@github-actions
Copy link
Copy Markdown

⚠️ Try run (#14984538646) failed.

@tharkum
Copy link
Copy Markdown
Contributor Author

tharkum commented May 13, 2025

WPT test: /html/semantics/embedded-content/the-canvas-element/security.pattern.fillStyle.sub.html
Any subtest with HTMLVideoElement has unstable result (from run to run)

@jdm < How you handle it (unstable results)?

The same symptoms with HTMLVideoElement as in #31931


No required events sometimes from GStreamer backend.
There is similar audio issue (#36626).

GOOD:

handle_player_event event = VideoFrameUpdated
handle_player_event event = SeekDone(0)
handle_player_event event = NeedData
.........
handle_player_event event = NeedData
handle_player_event event = StateChanged(Paused)
task_source.queue_simple_event(self.upcast(), atom!("canplaythrough"));

BAD:

handle_player_event event = VideoFrameUpdated
handle_player_event event = SeekDone(0)

@jdm
Copy link
Copy Markdown
Member

jdm commented May 13, 2025

We can file issues for unstable tests with the test path in the issue name and the I-intermittent label. They will cause the test results to be filtered out.

@jdm jdm added this pull request to the merge queue May 13, 2025
Merged via the queue into servo:main with commit 6468734 May 13, 2025
54 of 55 checks passed
@tharkum tharkum deleted the mock-svgimageelement-interface branch May 13, 2025 11:52
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.

Unexpected TIMEOUT in /html/canvas/element/manual/imagebitmap/createImageBitmap-premultiplyAlpha.html

2 participants