We'll stop dispatching keypress events on web contents for conforming to spec of UI Events. Some existing tests assumes that keypress events are fired even when non-printable keys are pressed. This patch makes them check the pref, "dom.keyboardevent.keypress.dispatch_non_printable_keys_only_system_group_in_content" and only listen to keydown event instead of keypress even if the pref is true and expected key event is not a printable key press. MozReview-Commit-ID: 6bKoK7dsB0l
20 lines
795 B
HTML
20 lines
795 B
HTML
<!DOCTYPE HTML>
|
|
<!-- This Source Code Form is subject to the terms of the Mozilla Public
|
|
- License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
|
|
<html dir="ltr" xml:lang="en-US" lang="en-US">
|
|
<head>
|
|
<meta charset="utf8">
|
|
</head>
|
|
<script>
|
|
var gKeyDowns = 0;
|
|
var gKeyPresses = 0;
|
|
</script>
|
|
<body onkeydown="gKeyDowns++;" onkeypress="gKeyPresses++">
|
|
<!-- This page could eventually request permissions from content
|
|
and make sure that chrome responds appropriately -->
|
|
<button id="geo" onclick="navigator.geolocation.getCurrentPosition(() => {})">Geolocation</button>
|
|
<button id="camera" onclick="navigator.mediaDevices.getUserMedia({video: true, fake: true})">Camera</button>
|
|
</body>
|
|
</html>
|