Chromium Code Reviews| Index: third_party/WebKit/LayoutTests/external/wpt/keyboard-lock/idl-KeyboardLock.html |
| diff --git a/third_party/WebKit/LayoutTests/external/wpt/keyboard-lock/idl-KeyboardLock.html b/third_party/WebKit/LayoutTests/external/wpt/keyboard-lock/idl-KeyboardLock.html |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..9e58281cf61c2432c224d243924a4de0c384d4f1 |
| --- /dev/null |
| +++ b/third_party/WebKit/LayoutTests/external/wpt/keyboard-lock/idl-KeyboardLock.html |
| @@ -0,0 +1,20 @@ |
| +<!DOCTYPE html> |
| +<title>Keyboard Lock - Interface</title> |
| +<script src="/resources/testharness.js"></script> |
| +<script src="/resources/testharnessreport.js"></script> |
| +<script> |
| +'use strict'; |
| + |
| +test(() => { |
| + // NavigatorKeyboardLock implements both requestKeyLock() and cancelKeyLock() |
|
foolip
2017/04/17 08:46:04
NavigatorKeyboardLock is just the name of the Blin
Hzj_jie
2017/04/18 02:26:07
Done.
|
| + // functions; |
| + assert_true('requestKeyLock' in navigator); |
| + assert_true('cancelKeyLock' in navigator); |
| + assert_equals(typeof(navigator.requestKeyLock), 'function'); |
| + assert_equals(typeof(navigator.cancelKeyLock), 'function'); |
| + const p = navigator.requestKeyLock([]); |
|
foolip
2017/04/17 08:46:04
The argument is optional, omit it here so that Typ
Hzj_jie
2017/04/18 02:26:07
Done.
|
| + assert_equals(typeof(p.then), 'function'); |
| + assert_equals(typeof(p.catch), 'function'); |
| +}, 'Keyboard Lock IDL test'); |
| + |
| +</script> |