Source code

Revision control

Copy as Markdown

Other Tools

Test Info: Warnings

<!doctype html>
<html>
<head>
<title>VirtualKeyboard: navigator.virtualKeyboard type</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
</head>
<body>
<h1>VirtualKeyboard: navigator.virtualKeyboard type</h1>
<h4>Test Description: This test checks that navigator.virtualKeyboard is an object of type VirtualKeyboard.</h4>
<script>
test(function() {
assert_equals(typeof(navigator.virtualKeyboard), "object");
}, "navigator.virtualKeyboard is an object");
test(function() {
assert_equals(navigator.virtualKeyboard.toString(), "[object VirtualKeyboard]");
}, "navigator.virtualKeyboard has type `VirtualKeyboard`");
test(function() {
assert_true(navigator.virtualKeyboard.show instanceof Function);
}, "navigator.virtualKeyboard.show instanceof Function");
test(function() {
assert_true(navigator.virtualKeyboard.hide instanceof Function);
}, "navigator.virtualKeyboard.hide instanceof Function");
addEventListener("load", function() {
document.getElementById("viewtype-log").innerText = typeof(navigator.virtualKeyboard);
});
</script>
<div id="complete-notice">
<p>navigator.virtualKeyboard is of type: <span id="viewtype-log"></span>.</p>
</div>
<div id="log"></div>
</body>
</html>