diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 01:13:27 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 01:13:27 +0000 |
commit | 40a355a42d4a9444dc753c04c6608dade2f06a23 (patch) | |
tree | 871fc667d2de662f171103ce5ec067014ef85e61 /testing/web-platform/tests/webhid | |
parent | Adding upstream version 124.0.1. (diff) | |
download | firefox-40a355a42d4a9444dc753c04c6608dade2f06a23.tar.xz firefox-40a355a42d4a9444dc753c04c6608dade2f06a23.zip |
Adding upstream version 125.0.1.upstream/125.0.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'testing/web-platform/tests/webhid')
-rw-r--r-- | testing/web-platform/tests/webhid/resources/automation.js | 42 |
1 files changed, 0 insertions, 42 deletions
diff --git a/testing/web-platform/tests/webhid/resources/automation.js b/testing/web-platform/tests/webhid/resources/automation.js deleted file mode 100644 index f7477d1ecc..0000000000 --- a/testing/web-platform/tests/webhid/resources/automation.js +++ /dev/null @@ -1,42 +0,0 @@ -'use strict'; - -let fakeHidService = undefined; - -function hid_test(func, name, properties) { - promise_test(async (test) => { - assert_implements(navigator.hid, 'missing navigator.hid'); - if (fakeHidService === undefined) { - // Try loading a polyfill for the fake hid service. - if (isChromiumBased) { - const fakes = await import('/resources/chromium/fake-hid.js'); - fakeHidService = fakes.fakeHidService; - } - } - assert_implements( - fakeHidService, 'missing fakeHidService after initialization'); - - fakeHidService.start(); - try { - await func(test, fakeHidService); - } finally { - fakeHidService.stop(); - fakeHidService.reset(); - } - }, name, properties); -} - -function trustedClick() { - return new Promise(resolve => { - let button = document.createElement('button'); - button.textContent = 'click to continue test'; - button.style.display = 'block'; - button.style.fontSize = '20px'; - button.style.padding = '10px'; - button.onclick = () => { - document.body.removeChild(button); - resolve(); - }; - document.body.appendChild(button); - test_driver.click(button); - }); -} |