diff --git a/testing/web-platform/meta/MANIFEST.json b/testing/web-platform/meta/MANIFEST.json index c50667a3b986..8de69580cddb 100644 --- a/testing/web-platform/meta/MANIFEST.json +++ b/testing/web-platform/meta/MANIFEST.json @@ -366477,9 +366477,9 @@ {} ] ], - "pointerevents/idlharness.html": [ + "pointerevents/idlharness.window.js": [ [ - "/pointerevents/idlharness.html", + "/pointerevents/idlharness.window.html", {} ] ], @@ -592899,7 +592899,7 @@ "support" ], "interfaces/pointerevents.idl": [ - "ef577f80b3480126c6d447fcaca219ae95bc8ec7", + "be4fdd5136343319cd3459cb669d033466e4013f", "support" ], "interfaces/pointerlock.idl": [ @@ -603834,8 +603834,8 @@ "0ac911fd576d98e897b1aa19ec27236b20f92e43", "manual" ], - "pointerevents/idlharness.html": [ - "90f3c1cd708d3760b3b8d30b73b39a2dbd5ab36f", + "pointerevents/idlharness.window.js": [ + "aa9b11c2c844ab0af60d705a93d4fe27d37aa3b4", "testharness" ], "pointerevents/pointerevent_attributes_hoverable_pointers-manual.html": [ diff --git a/testing/web-platform/tests/interfaces/pointerevents.idl b/testing/web-platform/tests/interfaces/pointerevents.idl index ef577f80b348..be4fdd513634 100644 --- a/testing/web-platform/tests/interfaces/pointerevents.idl +++ b/testing/web-platform/tests/interfaces/pointerevents.idl @@ -4,37 +4,38 @@ // See: https://w3c.github.io/pointerevents/ dictionary PointerEventInit : MouseEventInit { - long pointerId = 0; - double width = 1; - double height = 1; - float pressure = 0; - float tangentialPressure = 0; - long tiltX = 0; - long tiltY = 0; - long twist = 0; + long pointerId = 0; + double width = 1; + double height = 1; + float pressure = 0; + float tangentialPressure = 0; + long tiltX = 0; + long tiltY = 0; + long twist = 0; DOMString pointerType = ""; - boolean isPrimary = false; + boolean isPrimary = false; }; -[Constructor(DOMString type, optional PointerEventInit eventInitDict), - Exposed=Window] +[Constructor(DOMString type, optional PointerEventInit eventInitDict), Exposed=Window] interface PointerEvent : MouseEvent { - readonly attribute long pointerId; - readonly attribute double width; - readonly attribute double height; - readonly attribute float pressure; - readonly attribute float tangentialPressure; - readonly attribute long tiltX; - readonly attribute long tiltY; - readonly attribute long twist; - readonly attribute DOMString pointerType; - readonly attribute boolean isPrimary; + readonly attribute long pointerId; + readonly attribute double width; + readonly attribute double height; + readonly attribute float pressure; + readonly attribute float tangentialPressure; + readonly attribute long tiltX; + readonly attribute long tiltY; + readonly attribute long twist; + readonly attribute DOMString pointerType; + readonly attribute boolean isPrimary; }; + partial interface Element { - void setPointerCapture(long pointerId); - void releasePointerCapture(long pointerId); - boolean hasPointerCapture(long pointerId); + void setPointerCapture(long pointerId); + void releasePointerCapture(long pointerId); + boolean hasPointerCapture(long pointerId); }; + partial interface GlobalEventHandlers { attribute EventHandler ongotpointercapture; attribute EventHandler onlostpointercapture; @@ -47,6 +48,7 @@ partial interface GlobalEventHandlers { attribute EventHandler onpointerenter; attribute EventHandler onpointerleave; }; + partial interface Navigator { - readonly attribute long maxTouchPoints; + readonly attribute long maxTouchPoints; }; diff --git a/testing/web-platform/tests/pointerevents/idlharness.html b/testing/web-platform/tests/pointerevents/idlharness.html deleted file mode 100644 index 90f3c1cd708d..000000000000 --- a/testing/web-platform/tests/pointerevents/idlharness.html +++ /dev/null @@ -1,66 +0,0 @@ - - -idlharness test - - - - - - - - diff --git a/testing/web-platform/tests/pointerevents/idlharness.window.js b/testing/web-platform/tests/pointerevents/idlharness.window.js new file mode 100644 index 000000000000..aa9b11c2c844 --- /dev/null +++ b/testing/web-platform/tests/pointerevents/idlharness.window.js @@ -0,0 +1,20 @@ +// META: script=/resources/WebIDLParser.js +// META: script=/resources/idlharness.js + +'use strict'; + +// https://w3c.github.io/pointerevents/ + +idl_test( + ['pointerevents'], + ['uievents', 'dom', 'html'], + idl_array => { + idl_array.add_objects({ + Element: ['document'], + Window: ['window'], + Navigator: ['navigator'], + PointerEvent: ['new PointerEvent("type")'] + }); + }, + 'pointerevents interfaces' +);