Skip to content

Commit

Permalink
[VirtualKeyboard] Add Secure Context to VK interface.
Browse files Browse the repository at this point in the history
Added SecureContext to VK interface as we don't want to show/hide VK
when the document isn't the active document and hasn't been
authenticated. Some tests that used to run on insecure context were
changed to now use secure context instead. Using secure context also
led to removal of some tests where we were manually injecting VK
events to the browser. The embedded test server usage causes the
input method initialized in the RWHVA to use the real input method
instead of the mock implementation.
WPT tests in crrev.com/c/2993938 cover those cases.
Spec: https://github.com/w3c/editing/blob/gh-pages/docs/virtualkeyboard/index.html

Bug: 856269

Change-Id: Ie4fa4c50a08e8d439b985e62beea4d9aa57f3e26
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3003699
Reviewed-by: Kent Tamura <[email protected]>
Reviewed-by: Keith Lee <[email protected]>
Reviewed-by: Alexander Timin <[email protected]>
Commit-Queue: Anupam Snigdha <[email protected]>
Cr-Commit-Position: refs/heads/master@{#901863}
  • Loading branch information
snianu authored and chromium-wpt-export-bot committed Jul 15, 2021
1 parent f27bd06 commit 35593dd
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion virtual-keyboard/META.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
spec: https://github.com/w3c/editing/pull/309
spec: https://github.com/w3c/editing/blob/gh-pages/docs/virtualkeyboard/index.html
suggested_reviewers:
- snianu
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,14 @@ <h4>Test Description: This test checks that navigator.virtualKeyboard is an obje
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);
});
Expand Down

0 comments on commit 35593dd

Please sign in to comment.