Skip to content
Browse files
Support waiting for event in custom element

Patch by Youssef Soliman <> on 2022-06-21
Reviewed by Eric Carlson.

Some media related layout tests require event listeners on custom HTML elements.

* LayoutTests/media/video-test.js:

Canonical link:
git-svn-id: 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
youssefsoli authored and webkit-commit-queue committed Jun 22, 2022
1 parent a62eb94 commit d1a65d4
Showing 1 changed file with 11 additions and 1 deletion.
@@ -283,7 +283,17 @@ function waitForEventAndFail(eventName)
waitForEventAndTest(eventName, "false", true);

function waitForEventAndFailFor(element, eventName)
waitForEventAndTest(element, eventName, "false", true);

function waitForEventAndTest(eventName, testFuncString, endit)
waitForEventAndTestFor(mediaElement, eventName, testFuncString, endit)

function waitForEventAndTestFor(element, eventName, testFuncString, endit)
function _eventCallback(event)
@@ -292,7 +302,7 @@ function waitForEventAndTest(eventName, testFuncString, endit)

mediaElement.addEventListener(eventName, _eventCallback, true);
element.addEventListener(eventName, _eventCallback, true);

function waitForEventOnceOn(element, eventName, func, endit)

0 comments on commit d1a65d4

Please sign in to comment.