Skip to content

Commit

Permalink
Update LayoutTests/imported/w3c/web-platform-tests/webcodecs/videoFra…
Browse files Browse the repository at this point in the history
…me-construction.window.js to work around Safari SVG specificites

https://bugs.webkit.org/show_bug.cgi?id=258803
rdar://111679627

Reviewed by Eric Carlson.

Without a renderer and being in the DOM, SVG image element is not firing the load event, and does not have a cached image.
We update the test accoridngly, since the goal is to validate timestamps.
Bugs have been filed to track Safari SVG specifities.

* LayoutTests/TestExpectations:
* LayoutTests/imported/w3c/web-platform-tests/webcodecs/videoFrame-construction.window-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/webcodecs/videoFrame-construction.window.js:
(promise_test.async t):

Canonical link: https://commits.webkit.org/265724@main
  • Loading branch information
youennf committed Jul 3, 2023
1 parent b09b247 commit 17c12a1
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
1 change: 0 additions & 1 deletion LayoutTests/TestExpectations
Original file line number Diff line number Diff line change
Expand Up @@ -6245,7 +6245,6 @@ imported/w3c/web-platform-tests/wasm/serialization/module/cross-origin-module-sh
imported/w3c/web-platform-tests/wasm/serialization/module/share-module-cross-origin-fails.sub.html [ Skip ]
imported/w3c/web-platform-tests/wasm/serialization/module/window-domain-success.sub.html [ Skip ]
imported/w3c/web-platform-tests/wasm/serialization/module/window-similar-but-cross-origin-success.sub.html [ Skip ]
imported/w3c/web-platform-tests/webcodecs/videoFrame-construction.window.html [ Skip ]
imported/w3c/web-platform-tests/webcodecs/videoFrame-serialization.crossAgentCluster.https.html [ Skip ]
imported/w3c/web-platform-tests/webrtc/RTCConfiguration-iceTransportPolicy.html [ Skip ]
imported/w3c/web-platform-tests/webrtc/RTCPeerConnection-onicecandidateerror.https.html [ Skip ]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@

Harness Error (TIMEOUT), message = null

PASS Test that timestamp is required when constructing VideoFrame from HTMLImageElement
TIMEOUT Test that timestamp is required when constructing VideoFrame from SVGImageElement Test timed out
NOTRUN Test that timeamp is required when constructing VideoFrame from HTMLCanvasElement
PASS Test that timestamp is required when constructing VideoFrame from SVGImageElement
PASS Test that timeamp is required when constructing VideoFrame from HTMLCanvasElement

Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,15 @@ promise_test(async t => {
}, 'Test that timestamp is required when constructing VideoFrame from HTMLImageElement');

promise_test(async t => {
let svgImageElement = document.createElementNS('http://www.w3.org/2000/svg','image');
let loadPromise = new Promise(r => svgImageElement.onload = r);
const svgDocument = document.createElementNS('http://www.w3.org/2000/svg','svg');
document.body.appendChild(svgDocument);
const svgImageElement = document.createElementNS('http://www.w3.org/2000/svg','image');
svgDocument.appendChild(svgImageElement);
const loadPromise = new Promise(r => svgImageElement.onload = r);
svgImageElement.setAttributeNS('http://www.w3.org/1999/xlink','href','data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg==');
await loadPromise;
verifyTimestampRequiredToConstructFrame(svgImageElement);
document.body.removeChild(svgDocument);
}, 'Test that timestamp is required when constructing VideoFrame from SVGImageElement');

promise_test(async t => {
Expand Down

0 comments on commit 17c12a1

Please sign in to comment.