diff options
Diffstat (limited to 'testing/web-platform/tests/keyboard-lock/navigator-keyboard-lock.https.html')
-rw-r--r-- | testing/web-platform/tests/keyboard-lock/navigator-keyboard-lock.https.html | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/testing/web-platform/tests/keyboard-lock/navigator-keyboard-lock.https.html b/testing/web-platform/tests/keyboard-lock/navigator-keyboard-lock.https.html new file mode 100644 index 0000000000..674c336459 --- /dev/null +++ b/testing/web-platform/tests/keyboard-lock/navigator-keyboard-lock.https.html @@ -0,0 +1,29 @@ +<!DOCTYPE html> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script> +'use strict'; + +test(function() { + assert_true(navigator.keyboard instanceof Keyboard); +}, "navigator.keyboard instanceof Keyboard"); + +test(function() { + assert_equals(navigator.keyboard, navigator.keyboard); +}, "navigator.keyboard SameObject"); + +test(function() { + assert_true(navigator.keyboard.lock instanceof Function); +}, "navigator.keyboard.lock instanceof Function"); + +test(function() { + assert_true(navigator.keyboard.unlock instanceof Function); +}, "navigator.keyboard.unlock instanceof Function"); + +promise_test(() => { + const p = navigator.keyboard.lock(["KeyA", "KeyB"]); + assert_true(p instanceof Promise); + return p; +}, '[Keyboard Lock] keyboard.lock'); + +</script> |