From 8d1c860fcdddc7b4f2f441a5b4f6bb8f749ac1c7 Mon Sep 17 00:00:00 2001 From: ayeteadoe Date: Mon, 30 Jun 2025 10:22:01 -0700 Subject: [PATCH] LibWeb: Add OffscreenCanvas to ImageBitmap invalid-types-no-crash test --- .../expected/HTML/image-bitmap-from-invalid-types-no-crash.txt | 1 + .../input/HTML/image-bitmap-from-invalid-types-no-crash.html | 3 +++ 2 files changed, 4 insertions(+) diff --git a/Tests/LibWeb/Text/expected/HTML/image-bitmap-from-invalid-types-no-crash.txt b/Tests/LibWeb/Text/expected/HTML/image-bitmap-from-invalid-types-no-crash.txt index a4031938dc4..d57ad0fe383 100644 --- a/Tests/LibWeb/Text/expected/HTML/image-bitmap-from-invalid-types-no-crash.txt +++ b/Tests/LibWeb/Text/expected/HTML/image-bitmap-from-invalid-types-no-crash.txt @@ -4,4 +4,5 @@ HTMLImageElement [ Error ]: InvalidStateError: image argument is not usable SVGImageElement [ Error ]: InvalidStateError: image argument is not usable HTMLCanvasElement [ Error ]: Error: Not Implemented: createImageBitmap() for HTMLCanvasElement ImageBitmap [ Error ]: TypeError: No union types matched +OffscreenCanvas [ Error ]: Error: Not Implemented: createImageBitmap() for OffscreenCanvas HTMLVideoElement [ Error ]: InvalidStateError: image argument is not usable \ No newline at end of file diff --git a/Tests/LibWeb/Text/input/HTML/image-bitmap-from-invalid-types-no-crash.html b/Tests/LibWeb/Text/input/HTML/image-bitmap-from-invalid-types-no-crash.html index 80430362a5a..b421273a4b6 100644 --- a/Tests/LibWeb/Text/input/HTML/image-bitmap-from-invalid-types-no-crash.html +++ b/Tests/LibWeb/Text/input/HTML/image-bitmap-from-invalid-types-no-crash.html @@ -17,6 +17,8 @@ let svgImg = document.createElement("img"); svgImg = document.createElementNS("http://www.w3.org/2000/svg", "image"); + let offscreenCanvas = new OffscreenCanvas(42, 42); + let video = document.createElement("video"); let file = new Blob([ new Uint8Array([ @@ -32,6 +34,7 @@ [svgImg, "SVGImageElement"], [canvas, "HTMLCanvasElement"], [imageBitmap, "ImageBitmap"], + [offscreenCanvas, "OffscreenCanvas"], [video, "HTMLVideoElement"], ];