Index: third_party/WebKit/LayoutTests/external/wpt/keyboard-lock/testKeyboardLockTwoParallelRequests.html |
diff --git a/third_party/WebKit/LayoutTests/external/wpt/keyboard-lock/testKeyboardLockTwoParallelRequests.html b/third_party/WebKit/LayoutTests/external/wpt/keyboard-lock/testKeyboardLockTwoParallelRequests.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..bd90ac738d9f4c7e7b9659d8baed87d577b77504 |
--- /dev/null |
+++ b/third_party/WebKit/LayoutTests/external/wpt/keyboard-lock/testKeyboardLockTwoParallelRequests.html |
@@ -0,0 +1,18 @@ |
+<!DOCTYPE html> |
+<title> |
+ Keyboard Lock - The second of two parallel requests should be rejected |
foolip
2017/04/17 08:46:04
The spec doesn't return a promise and thus doesn't
Hzj_jie
2017/04/18 02:26:08
I have added TODO in the idl file. Once we ship it
|
+</title> |
+<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 concurrently test'); |
+ |
+</script> |