Index: third_party/WebKit/LayoutTests/external/wpt/keyboard-lock/navigator-requestKeyLock-two-parallel-requests.https.html |
diff --git a/third_party/WebKit/LayoutTests/external/wpt/keyboard-lock/navigator-requestKeyLock-two-parallel-requests.https.html b/third_party/WebKit/LayoutTests/external/wpt/keyboard-lock/navigator-requestKeyLock-two-parallel-requests.https.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..b8716d370c7d5a8139c6dd178816b86dd3e3b477 |
--- /dev/null |
+++ b/third_party/WebKit/LayoutTests/external/wpt/keyboard-lock/navigator-requestKeyLock-two-parallel-requests.https.html |
@@ -0,0 +1,15 @@ |
+<!DOCTYPE html> |
+<script src="/resources/testharness.js"></script> |
+<script src="/resources/testharnessreport.js"></script> |
+<script> |
+'use strict'; |
+ |
+promise_test((t) => { |
+ const p1 = navigator.requestKeyLock(['a', 'b']); |
+ const p2 = navigator.requestKeyLock(['c', 'd']); |
+ return promise_rejects(t, null, p2, |
+ 'requestKeyLock() should only be ' + |
+ 'executed if another request has finished.'); |
+}, 'Keyboard Lock requestKeyLock twice in parallel'); |
+ |
+</script> |