https://github.com/web-platform-tests/wpt
Raw File
Tip revision: 0322f4a8924395e866e774d68200e5844e72f793 authored by Lennart Grahl on 19 May 2018, 00:04:14 UTC
Add a test based on discussion in https://github.com/w3c/webrtc-pc/pull/1851 with @jan-ivar
Tip revision: 0322f4a
navigator-keyboard-lock-two-parallel-requests.https.html
<!DOCTYPE html>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script>
'use strict';

promise_test((t) => {
  const p1 = navigator.keyboard.lock(["KeyA", "KeyB"]);
  const p2 = navigator.keyboard.lock(["KeyC", "KeyD"]);
  return Promise.all([promise_rejects(t, "AbortError", p1), p2]);
}, '[Keyboard Lock] keyboard.lock twice in parallel');

</script>
back to top