servo/tests/wpt/web-platform-tests/keyboard-lock/navigator-keyboardLock-two-parallel-requests.https.html

15 lines
460 B
HTML

<!DOCTYPE html>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script>
'use strict';
promise_test((t) => {
const p1 = navigator.keyboardLock(['a', 'b']);
const p2 = navigator.keyboardLock(['c', 'd']);
return promise_rejects(t, null, p2,
'keyboardLock() should only be ' +
'executed if another request has finished.');
}, 'Keyboard Lock keyboardLock twice in parallel');
</script>