diff --git a/event-timing/first-input-interactionid-tap.html b/event-timing/first-input-interactionid-click.html similarity index 81% rename from event-timing/first-input-interactionid-tap.html rename to event-timing/first-input-interactionid-click.html index c5c6f5177ebd988..7295e35b5de4c0a 100644 --- a/event-timing/first-input-interactionid-tap.html +++ b/event-timing/first-input-interactionid-click.html @@ -1,13 +1,11 @@ - -Event Timing: first-input-interactionId-tap. - +First Input: interactionId-click. + - @@ -49,8 +47,8 @@ } })).observe({ entryTypes: ["event", "first-input"] }); - addListenersAndTap(document.getElementById('test'), ['pointerdown', 'pointerup']); - }, "Event Timing: The interactionId of first input should match the event timing pointerdown entry when tap."); + addListenersAndClick(document.getElementById('testButtonId')); + }, "The interactionId of the first input entry should match the same pointerdown entry of event timing when click."); diff --git a/event-timing/interactionid-click.html b/event-timing/interactionid-click.html index a43f9a2a4b479da..f0d32e63aefbf39 100644 --- a/event-timing/interactionid-click.html +++ b/event-timing/interactionid-click.html @@ -11,18 +11,7 @@ diff --git a/event-timing/resources/event-timing-test-utils.js b/event-timing/resources/event-timing-test-utils.js index c549e7ebf616d62..f60bfb21afb81be 100644 --- a/event-timing/resources/event-timing-test-utils.js +++ b/event-timing/resources/event-timing-test-utils.js @@ -314,6 +314,13 @@ async function addListenersAndPress(element, key, events) { pressKey(element, key); } +// The testdriver.js, testdriver-vendor.js need to be included to use this +// function. +async function addListenersAndClick(element) { + addListeners(element, ['mousedown', 'mouseup', 'pointerdown', 'pointerup', 'click']); + await test_driver.click(element); +} + function filterAndAddToMap(events, map) { return function (entry) { if (events.includes(entry.name)) {