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

Side by Side Diff: LayoutTests/imported/web-platform-tests/gamepad/idlharness.html

Issue 816533002: Import CSSWG Shapes tests (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: One more test expectations update Created 6 years 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 | Annotate | Revision Log
OLDNEW
(Empty)
1 <!doctype html>
2 <html>
3 <head>
4 <title>Gamepad IDL tests</title>
5 <link rel="help" href="https://dvcs.w3.org/hg/gamepad/raw-file/default/gamepad.h tml#gamepad-interface">
6 <link rel="help" href="https://dvcs.w3.org/hg/gamepad/raw-file/default/gamepad.h tml#gamepadbutton-interface">
7 <link rel="help" href="https://dvcs.w3.org/hg/gamepad/raw-file/default/gamepad.h tml#gamepadevent-interface">
8 <link rel="help" href="https://dvcs.w3.org/hg/gamepad/raw-file/default/gamepad.h tml#navigator-interface-extension">
9 <script src="../../../resources/testharness.js"></script>
10 <script src="../../../resources/testharnessreport.js"></script>
11 <script src="/resources/WebIDLParser.js"></script>
12 <script src="/resources/idlharness.js"></script>
13 </head>
14 <body>
15 <pre id="untested_idl" style="display: none">
16 interface Navigator {
17 };
18
19 interface Event {
20 };
21 </pre>
22 <pre id="idl" style="display: none">
23 interface Gamepad {
24 readonly attribute DOMString id;
25 readonly attribute long index;
26 readonly attribute boolean connected;
27 readonly attribute DOMHighResTimeStamp timestamp;
28 readonly attribute GamepadMappingType mapping;
29 readonly attribute double[] axes;
30 readonly attribute GamepadButton[] buttons;
31 };
32
33 enum GamepadMappingType {
34 "",
35 "standard"
36 };
37
38 interface GamepadButton {
39 readonly attribute boolean pressed;
40 readonly attribute double value;
41 };
42
43 [Constructor(DOMString type, optional GamepadEventInit eventInitDict)]
44 interface GamepadEvent : Event
45 {
46 readonly attribute Gamepad? gamepad;
47 };
48
49 dictionary GamepadEventInit : EventInit
50 {
51 Gamepad? gamepad = null;
52 };
53
54 partial interface Navigator {
55 Gamepad[] getGamepads();
56 };
57 </pre>
58 <script>
59 var idl_array = new IdlArray();
60 idl_array.add_untested_idls(document.getElementById("untested_idl").textContent) ;
61 idl_array.add_idls(document.getElementById("idl").textContent);
62 idl_array.add_objects({
63 GamepadEvent: [new GamepadEvent("something")],
64 Navigator: ["navigator"],
65 });
66 idl_array.test();
67 </script>
68 <div id="log"></div>
69 </body>
70 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698