Index: third_party/WebKit/LayoutTests/fast/events/constructors/pointer-event-constructor.html |
diff --git a/third_party/WebKit/LayoutTests/fast/events/constructors/pointer-event-constructor.html b/third_party/WebKit/LayoutTests/fast/events/constructors/pointer-event-constructor.html |
index 0b2ae15cfba3f30d9a65c22dfed32f6f3364d7c3..4e3cdad15da738c138ddaccbcbd7a69ca0829840 100644 |
--- a/third_party/WebKit/LayoutTests/fast/events/constructors/pointer-event-constructor.html |
+++ b/third_party/WebKit/LayoutTests/fast/events/constructors/pointer-event-constructor.html |
@@ -83,4 +83,21 @@ shouldBeZero("new PointerEvent('eventType').button"); |
shouldBeZero("new PointerEvent('eventType').buttons"); |
shouldBeNull("new PointerEvent('eventType').relatedTarget"); |
+debug("--- tests for coalesced events ---"); |
+var coalescedEvents = [ |
+ new PointerEvent('eventType', { 'pressure' : 1, pointerId : 2 }), |
+ new PointerEvent('eventType', { 'pressure' : 0.5, pointerId : 2 }), |
+]; |
+var pe = new PointerEvent('eventType', {'coalescedEvents': coalescedEvents, 'pressure' : 0.1, pointerId : 1 }); |
+shouldBeEqualToNumber("pe.getCoalescedEvents().length", coalescedEvents.length); |
+ |
+shouldBeCloseTo("pe.pressure", 0.1, 0.00001); |
+shouldBeCloseTo("pe.getCoalescedEvents()[0].pressure", 1, 0.00001); |
+shouldBeCloseTo("pe.getCoalescedEvents()[1].pressure", 0.5, 0.00001); |
+ |
+shouldBeEqualToNumber("pe.pointerId", 1); |
+shouldBeEqualToNumber("pe.getCoalescedEvents()[0].pointerId", 2); |
+shouldBeEqualToNumber("pe.getCoalescedEvents()[1].pointerId", 2); |
+ |
+ |
</script> |