diff --git a/Tests/LibWeb/Text/expected/wpt-import/gamepad/idlharness.window.txt b/Tests/LibWeb/Text/expected/wpt-import/gamepad/idlharness.window.txt new file mode 100644 index 0000000000..c7cb54cf61 --- /dev/null +++ b/Tests/LibWeb/Text/expected/wpt-import/gamepad/idlharness.window.txt @@ -0,0 +1,91 @@ +Harness status: OK + +Found 85 tests + +81 Pass +4 Fail +Pass idl_test setup +Pass idl_test validation +Pass Partial interface Navigator: original interface defined +Pass Partial interface Navigator: valid exposure set +Pass Partial interface Navigator: member names are unique +Pass Partial interface mixin WindowEventHandlers: original interface mixin defined +Pass Partial interface mixin WindowEventHandlers: member names are unique +Pass Partial interface Navigator[2]: member names are unique +Pass Partial interface Element: member names are unique +Pass Partial interface mixin NavigatorID: member names are unique +Pass Partial interface HTMLBodyElement: member names are unique +Pass Partial interface Window: member names are unique +Pass HTMLElement includes GlobalEventHandlers: member names are unique +Pass HTMLElement includes ElementContentEditable: member names are unique +Pass HTMLElement includes HTMLOrSVGElement: member names are unique +Pass HTMLBodyElement includes WindowEventHandlers: member names are unique +Pass Window includes GlobalEventHandlers: member names are unique +Pass Window includes WindowEventHandlers: member names are unique +Pass Window includes WindowOrWorkerGlobalScope: member names are unique +Pass Navigator includes NavigatorID: member names are unique +Pass Navigator includes NavigatorLanguage: member names are unique +Pass Navigator includes NavigatorOnLine: member names are unique +Pass Navigator includes NavigatorContentUtils: member names are unique +Pass Navigator includes NavigatorCookies: member names are unique +Pass Navigator includes NavigatorPlugins: member names are unique +Pass Navigator includes NavigatorConcurrentHardware: member names are unique +Pass Window includes AnimationFrameProvider: member names are unique +Pass Window includes WindowSessionStorage: member names are unique +Pass Window includes WindowLocalStorage: member names are unique +Pass HTMLFrameSetElement includes WindowEventHandlers: member names are unique +Pass Element includes ParentNode: member names are unique +Pass Element includes NonDocumentTypeChildNode: member names are unique +Pass Element includes ChildNode: member names are unique +Pass Element includes Slottable: member names are unique +Pass Gamepad interface: existence and properties of interface object +Pass Gamepad interface object length +Pass Gamepad interface object name +Pass Gamepad interface: existence and properties of interface prototype object +Pass Gamepad interface: existence and properties of interface prototype object's "constructor" property +Pass Gamepad interface: existence and properties of interface prototype object's @@unscopables property +Pass Gamepad interface: attribute id +Pass Gamepad interface: attribute index +Pass Gamepad interface: attribute connected +Pass Gamepad interface: attribute timestamp +Pass Gamepad interface: attribute mapping +Pass Gamepad interface: attribute axes +Pass Gamepad interface: attribute buttons +Fail Gamepad interface: attribute touches +Pass Gamepad interface: attribute vibrationActuator +Pass GamepadButton interface: existence and properties of interface object +Pass GamepadButton interface object length +Pass GamepadButton interface object name +Pass GamepadButton interface: existence and properties of interface prototype object +Pass GamepadButton interface: existence and properties of interface prototype object's "constructor" property +Pass GamepadButton interface: existence and properties of interface prototype object's @@unscopables property +Pass GamepadButton interface: attribute pressed +Pass GamepadButton interface: attribute touched +Pass GamepadButton interface: attribute value +Pass GamepadHapticActuator interface: existence and properties of interface object +Pass GamepadHapticActuator interface object length +Pass GamepadHapticActuator interface object name +Pass GamepadHapticActuator interface: existence and properties of interface prototype object +Pass GamepadHapticActuator interface: existence and properties of interface prototype object's "constructor" property +Pass GamepadHapticActuator interface: existence and properties of interface prototype object's @@unscopables property +Pass GamepadHapticActuator interface: attribute effects +Pass GamepadHapticActuator interface: operation playEffect(GamepadHapticEffectType, optional GamepadEffectParameters) +Pass GamepadHapticActuator interface: operation reset() +Pass GamepadEvent interface: existence and properties of interface object +Pass GamepadEvent interface object length +Pass GamepadEvent interface object name +Pass GamepadEvent interface: existence and properties of interface prototype object +Pass GamepadEvent interface: existence and properties of interface prototype object's "constructor" property +Pass GamepadEvent interface: existence and properties of interface prototype object's @@unscopables property +Pass GamepadEvent interface: attribute gamepad +Fail GamepadEvent must be primary interface of new GamepadEvent("gamepad") +Fail Stringification of new GamepadEvent("gamepad") +Fail GamepadEvent interface: new GamepadEvent("gamepad") must inherit property "gamepad" with the proper type +Pass HTMLBodyElement interface: attribute ongamepadconnected +Pass HTMLBodyElement interface: attribute ongamepaddisconnected +Pass Window interface: attribute ongamepadconnected +Pass Window interface: attribute ongamepaddisconnected +Pass Navigator interface: operation getGamepads() +Pass Navigator interface: navigator must inherit property "getGamepads()" with the proper type +Pass HTMLFrameSetElement interface: attribute ongamepadconnected +Pass HTMLFrameSetElement interface: attribute ongamepaddisconnected \ No newline at end of file diff --git a/Tests/LibWeb/Text/input/wpt-import/gamepad/idlharness.window.html b/Tests/LibWeb/Text/input/wpt-import/gamepad/idlharness.window.html new file mode 100644 index 0000000000..12b5cfc230 --- /dev/null +++ b/Tests/LibWeb/Text/input/wpt-import/gamepad/idlharness.window.html @@ -0,0 +1,9 @@ + + + + + + + +
+ diff --git a/Tests/LibWeb/Text/input/wpt-import/gamepad/idlharness.window.js b/Tests/LibWeb/Text/input/wpt-import/gamepad/idlharness.window.js new file mode 100644 index 0000000000..b15bf1f0ae --- /dev/null +++ b/Tests/LibWeb/Text/input/wpt-import/gamepad/idlharness.window.js @@ -0,0 +1,18 @@ +// META: script=/resources/WebIDLParser.js +// META: script=/resources/idlharness.js +// META: timeout=long + +// https://w3c.github.io/gamepad/ + +'use strict'; + +idl_test( + ['gamepad'], + ['html', 'dom'], + idl_array => { + idl_array.add_objects({ + GamepadEvent: ['new GamepadEvent("gamepad")'], + Navigator: ['navigator'] + }); + } +); diff --git a/Tests/LibWeb/Text/input/wpt-import/interfaces/gamepad.idl b/Tests/LibWeb/Text/input/wpt-import/interfaces/gamepad.idl new file mode 100644 index 0000000000..200947968e --- /dev/null +++ b/Tests/LibWeb/Text/input/wpt-import/interfaces/gamepad.idl @@ -0,0 +1,87 @@ +// GENERATED CONTENT - DO NOT EDIT +// Content was automatically extracted by Reffy into webref +// (https://github.com/w3c/webref) +// Source: Gamepad (https://w3c.github.io/gamepad/) + +[Exposed=Window] +interface Gamepad { + readonly attribute DOMString id; + readonly attribute long index; + readonly attribute boolean connected; + readonly attribute DOMHighResTimeStamp timestamp; + readonly attribute GamepadMappingType mapping; + readonly attribute FrozenArray axes; + readonly attribute FrozenArray buttons; + readonly attribute FrozenArray touches; + [SameObject] readonly attribute GamepadHapticActuator vibrationActuator; +}; + +[Exposed=Window] +interface GamepadButton { + readonly attribute boolean pressed; + readonly attribute boolean touched; + readonly attribute double value; +}; + +dictionary GamepadTouch { + unsigned long touchId; + octet surfaceId; + DOMPointReadOnly position; + DOMRectReadOnly? surfaceDimensions; +}; + +enum GamepadMappingType { + "", + "standard", + "xr-standard", +}; + +[Exposed=Window] +interface GamepadHapticActuator { + [SameObject] readonly attribute FrozenArray effects; + Promise playEffect( + GamepadHapticEffectType type, + optional GamepadEffectParameters params = {} + ); + Promise reset(); +}; + +enum GamepadHapticsResult { + "complete", + "preempted" +}; + +enum GamepadHapticEffectType { + "dual-rumble", + "trigger-rumble" +}; + +dictionary GamepadEffectParameters { + unsigned long long duration = 0; + unsigned long long startDelay = 0; + double strongMagnitude = 0.0; + double weakMagnitude = 0.0; + double leftTrigger = 0.0; + double rightTrigger = 0.0; +}; + +[Exposed=Window] +partial interface Navigator { + sequence getGamepads(); +}; + +[Exposed=Window] + +interface GamepadEvent: Event { + constructor(DOMString type, GamepadEventInit eventInitDict); + [SameObject] readonly attribute Gamepad gamepad; +}; + +dictionary GamepadEventInit : EventInit { + required Gamepad gamepad; +}; + +partial interface mixin WindowEventHandlers { + attribute EventHandler ongamepadconnected; + attribute EventHandler ongamepaddisconnected; +};