From 0200a233fd1ab3508d3c026190b1394eb260d392 Mon Sep 17 00:00:00 2001 From: Ms2ger Date: Mon, 20 Feb 2017 13:02:26 +0100 Subject: [PATCH] Make EventListener-invoke-legacy.html a little more robust to missing interfaces. --- tests/wpt/metadata/MANIFEST.json | 2 +- .../EventListener-invoke-legacy.html.ini | 20 ++++++++++++++++++- .../events/EventListener-invoke-legacy.html | 10 +++++----- 3 files changed, 25 insertions(+), 7 deletions(-) diff --git a/tests/wpt/metadata/MANIFEST.json b/tests/wpt/metadata/MANIFEST.json index f93d826ee26..edbb4f2386e 100644 --- a/tests/wpt/metadata/MANIFEST.json +++ b/tests/wpt/metadata/MANIFEST.json @@ -160431,7 +160431,7 @@ "support" ], "dom/events/EventListener-invoke-legacy.html": [ - "5c047e994f2bcb971918b42760c70cea7176abcb", + "e56b332acb454ab76964b78588536777946ddff8", "testharness" ], "dom/events/EventListenerOptions-capture.html": [ diff --git a/tests/wpt/metadata/dom/events/EventListener-invoke-legacy.html.ini b/tests/wpt/metadata/dom/events/EventListener-invoke-legacy.html.ini index ebfd31cb127..ff1b7c039c6 100644 --- a/tests/wpt/metadata/dom/events/EventListener-invoke-legacy.html.ini +++ b/tests/wpt/metadata/dom/events/EventListener-invoke-legacy.html.ini @@ -1,9 +1,27 @@ [EventListener-invoke-legacy.html] type: testharness - expected: ERROR + expected: TIMEOUT [Listener of transitionend] expected: FAIL [Legacy listener of transitionend] expected: TIMEOUT + [Listener of animationend] + expected: TIMEOUT + + [Legacy listener of animationend] + expected: TIMEOUT + + [Listener of animationiteration] + expected: TIMEOUT + + [Legacy listener of animationiteration] + expected: TIMEOUT + + [Listener of animationstart] + expected: TIMEOUT + + [Legacy listener of animationstart] + expected: TIMEOUT + diff --git a/tests/wpt/web-platform-tests/dom/events/EventListener-invoke-legacy.html b/tests/wpt/web-platform-tests/dom/events/EventListener-invoke-legacy.html index a969c8072b4..85a4b0a5fe6 100644 --- a/tests/wpt/web-platform-tests/dom/events/EventListener-invoke-legacy.html +++ b/tests/wpt/web-platform-tests/dom/events/EventListener-invoke-legacy.html @@ -43,7 +43,7 @@ function runLegacyEventTest(type, legacyType, ctor, setup) { assert_unreached("listener of " + legacyType + " should not be invoked again"); return; } - elem.dispatchEvent(new ctor(type)); + elem.dispatchEvent(new window[ctor](type)); t.done(); })); setup(elem); @@ -65,8 +65,8 @@ function setupAnimation(elem) { elem.style.animation = 'test 30ms 2'; } -runLegacyEventTest('transitionend', 'webkitTransitionEnd', TransitionEvent, setupTransition); -runLegacyEventTest('animationend', 'webkitAnimationEnd', AnimationEvent, setupAnimation); -runLegacyEventTest('animationiteration', 'webkitAnimationIteration', AnimationEvent, setupAnimation); -runLegacyEventTest('animationstart', 'webkitAnimationStart', AnimationEvent, setupAnimation); +runLegacyEventTest('transitionend', 'webkitTransitionEnd', "TransitionEvent", setupTransition); +runLegacyEventTest('animationend', 'webkitAnimationEnd', "AnimationEvent", setupAnimation); +runLegacyEventTest('animationiteration', 'webkitAnimationIteration', "AnimationEvent", setupAnimation); +runLegacyEventTest('animationstart', 'webkitAnimationStart', "AnimationEvent", setupAnimation);