Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(353)

Side by Side Diff: third_party/WebKit/LayoutTests/external/wpt/test_keys_wdspec.html

Issue 2668783003: Import wpt@767dc2a4f049c761bd146d61de2ea860a895a624 (Closed)
Patch Set: Update test expectations and baselines. Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 <!doctype html>
2 <meta charset=utf-8>
3
4 <head>
5 <title>Test Keys</title>
6 <script>
7 var allEvents = {events: []};
8 function displayMessage(message) {
9 document.getElementById("events").innerHTML = "<p>" + message + "</p >";
10 }
11
12 function appendMessage(message) {
13 document.getElementById("events").innerHTML += "<p>" + message + "</ p>";
14 }
15
16
17 function recordEvent(event) {
18 allEvents.events.push({
19 "code": event.code,
20 "key": event.key,
21 "which": event.which,
22 "location": event.location,
23 "ctrl": event.ctrlKey,
24 "meta": event.metaKey,
25 "shift": event.shiftKey,
26 "repeat": event.repeat,
27 "type": event.type
28 });
29 appendMessage(`${event.type}(code:${event.code}, key:${event.key}, whi ch:${event.which})`);
30 }
31
32 function resetEvents() {
33 allEvents.events.length = 0;
34 displayMessage('');
35 }
36
37 </script>
38 </head>
39 <body>
40 <div>
41 <h2>KeyReporter</h2>
42 <input type="text" id="keys" size="80"
43 onkeyup="recordEvent(event)"
44 onkeypress="recordEvent(event)"
45 onkeydown="recordEvent(event)">
46 </div>
47 <div id="resultContainer" style="width:300;height:60">
48 <h2>Events</h2>
49 <div id="events"></div>
50 </div>
51
52 </body>
53 </html>
54
55
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698