diff --git a/third_party/WebKit/LayoutTests/virtual/pointerevent/fast/events/pointerevents/touch-capture-expected.txt b/third_party/WebKit/LayoutTests/virtual/pointerevent/fast/events/pointerevents/touch-capture-expected.txt index 90ccf681c4d10..d4f0a6bbe7a75 100644 --- a/third_party/WebKit/LayoutTests/virtual/pointerevent/fast/events/pointerevents/touch-capture-expected.txt +++ b/third_party/WebKit/LayoutTests/virtual/pointerevent/fast/events/pointerevents/touch-capture-expected.txt @@ -3,7 +3,7 @@ Verifies that pointer capture works for touch. On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". - ======= Touch and release ======= + ======= Touch and release ======= **** First touch on green box & jiggle **** green received pointerover 2 grey received pointerenter 2 @@ -26,7 +26,7 @@ grey received pointerleave 2 green received lostpointercapture 2 green received touchend - ======= Touch and cancel ======= + ======= Touch and cancel ======= **** First touch on green box & jiggle **** green received pointerover 3 grey received pointerenter 3 @@ -49,7 +49,7 @@ grey received pointerleave 3 green received lostpointercapture 3 green received touchcancel - ======= Multitouch and release ======= + ======= Multitouch and release ======= **** First touch on green & second touch on blue & jiggle **** green received pointerover 4 grey received pointerenter 4 @@ -88,7 +88,7 @@ blue received pointerleave 5 blue received lostpointercapture 5 blue received touchend - ======= Multitouch and cancel ======= + ======= Multitouch and cancel ======= **** First touch on green & second touch on blue & jiggle **** green received pointerover 6 grey received pointerenter 6 @@ -125,6 +125,290 @@ blue received pointercancel 7 blue received pointerout 7 blue received pointerleave 7 blue received lostpointercapture 7 +blue received touchcancel + + ======= Touch and release with capture release ======= + **** First touch on green box & jiggle **** +green received pointerover 8 +grey received pointerenter 8 +green received pointerenter 8 +green received pointerdown 8 +green received touchstart +green received gotpointercapture 8 +green received pointermove 8 +green received touchmove + **** Move to blue box & jiggle **** +green received pointermove 8 + &&& Releasing pointer capture for 8 &&& +green received touchmove +green received pointerout 8 +green received pointerleave 8 +grey received pointerleave 8 +green received lostpointercapture 8 +blue received pointerover 8 +blue received pointerenter 8 +blue received pointermove 8 +green received touchmove + **** Release touch **** +blue received pointerup 8 +blue received pointerout 8 +blue received pointerleave 8 +green received touchend + + ======= Touch and cancel with capture release ======= + **** First touch on green box & jiggle **** +green received pointerover 9 +grey received pointerenter 9 +green received pointerenter 9 +green received pointerdown 9 +green received touchstart +green received gotpointercapture 9 +green received pointermove 9 +green received touchmove + **** Move to blue box & jiggle **** +green received pointermove 9 + &&& Releasing pointer capture for 9 &&& +green received touchmove +green received pointerout 9 +green received pointerleave 9 +grey received pointerleave 9 +green received lostpointercapture 9 +blue received pointerover 9 +blue received pointerenter 9 +blue received pointermove 9 +green received touchmove + **** Cancel touch **** +blue received pointercancel 9 +blue received pointerout 9 +blue received pointerleave 9 +green received touchcancel + + ======= Multitouch and release with capture release ======= + **** First touch on green & second touch on blue & jiggle **** +green received pointerover 10 +grey received pointerenter 10 +green received pointerenter 10 +green received pointerdown 10 +green received touchstart +blue received pointerover 11 +blue received pointerenter 11 +blue received pointerdown 11 +blue received touchstart +green received gotpointercapture 10 +green received pointermove 10 +green received touchmove +blue received gotpointercapture 11 +blue received pointermove 11 + &&& Releasing pointer capture for 11 &&& +blue received touchmove + **** Move first touch to blue & second touch to green **** +green received pointermove 10 +green received touchmove +blue received pointerout 11 +blue received pointerleave 11 +blue received lostpointercapture 11 +green received pointerover 11 +grey received pointerenter 11 +green received pointerenter 11 +green received pointermove 11 +blue received touchmove + **** Release first touch **** +green received pointerup 10 +green received pointerout 10 +green received pointerleave 10 +grey received pointerleave 10 +green received lostpointercapture 10 +green received touchend + **** Jiggle second touch on green **** +green received pointermove 11 +blue received touchmove + **** Release second touch **** +green received pointerup 11 +green received pointerout 11 +green received pointerleave 11 +grey received pointerleave 11 +blue received touchend + + ======= Multitouch and cancel with capture release ======= + **** First touch on green & second touch on blue & jiggle **** +green received pointerover 12 +grey received pointerenter 12 +green received pointerenter 12 +green received pointerdown 12 +green received touchstart +blue received pointerover 13 +blue received pointerenter 13 +blue received pointerdown 13 +blue received touchstart +green received gotpointercapture 12 +green received pointermove 12 +green received touchmove +blue received gotpointercapture 13 +blue received pointermove 13 + &&& Releasing pointer capture for 13 &&& +blue received touchmove + **** Move first touch to blue & second touch to green **** +green received pointermove 12 +green received touchmove +blue received pointerout 13 +blue received pointerleave 13 +blue received lostpointercapture 13 +green received pointerover 13 +grey received pointerenter 13 +green received pointerenter 13 +green received pointermove 13 +blue received touchmove + **** Cancel first touch **** +green received pointercancel 12 +green received pointerout 12 +green received pointerleave 12 +grey received pointerleave 12 +green received lostpointercapture 12 +green received touchcancel + **** Jiggle second touch on green **** +green received pointermove 13 +blue received touchmove + **** Cancel second touch **** +green received pointercancel 13 +green received pointerout 13 +green received pointerleave 13 +grey received pointerleave 13 +blue received touchcancel + + ======= Touch and release with capture reset ======= + **** First touch on green box & jiggle **** +green received pointerover 14 +grey received pointerenter 14 +green received pointerenter 14 +green received pointerdown 14 + --- Set pointer capture to blue 14 --- +green received touchstart +green received pointerout 14 +green received pointerleave 14 +grey received pointerleave 14 +blue received gotpointercapture 14 +blue received pointerover 14 +blue received pointerenter 14 +blue received pointermove 14 +green received touchmove + **** Move to blue box & jiggle **** +blue received pointermove 14 +green received touchmove +blue received pointermove 14 +green received touchmove + **** Release touch **** +blue received pointerup 14 +blue received lostpointercapture 14 +green received touchend + + ======= Touch and cancel with capture reset ======= + **** First touch on green box & jiggle **** +green received pointerover 15 +grey received pointerenter 15 +green received pointerenter 15 +green received pointerdown 15 + --- Set pointer capture to blue 15 --- +green received touchstart +green received pointerout 15 +green received pointerleave 15 +grey received pointerleave 15 +blue received gotpointercapture 15 +blue received pointerover 15 +blue received pointerenter 15 +blue received pointermove 15 +green received touchmove + **** Move to blue box & jiggle **** +blue received pointermove 15 +green received touchmove +blue received pointermove 15 +green received touchmove + **** Cancel touch **** +blue received pointercancel 15 +blue received lostpointercapture 15 +green received touchcancel + + ======= Multitouch and release with capture reset ======= + **** First touch on green & second touch on blue & jiggle **** +green received pointerover 16 +grey received pointerenter 16 +green received pointerenter 16 +green received pointerdown 16 + --- Set pointer capture to blue 16 --- +green received touchstart +blue received pointerover 17 +blue received pointerenter 17 +blue received pointerdown 17 +blue received touchstart +green received pointerout 16 +green received pointerleave 16 +grey received pointerleave 16 +blue received gotpointercapture 16 +blue received pointerover 16 +blue received pointerenter 16 +blue received pointermove 16 +green received touchmove +blue received gotpointercapture 17 +blue received pointermove 17 +blue received touchmove + **** Move first touch to blue & second touch to green **** +blue received pointermove 16 +green received touchmove +blue received pointermove 17 +blue received touchmove + **** Release first touch **** +blue received pointerup 16 +blue received lostpointercapture 16 +green received touchend + **** Jiggle second touch on green **** +blue received pointermove 17 +blue received touchmove + **** Release second touch **** +blue received pointerup 17 +blue received pointerout 17 +blue received pointerleave 17 +blue received lostpointercapture 17 +blue received touchend + + ======= Multitouch and cancel with capture reset ======= + **** First touch on green & second touch on blue & jiggle **** +green received pointerover 18 +grey received pointerenter 18 +green received pointerenter 18 +green received pointerdown 18 + --- Set pointer capture to blue 18 --- +green received touchstart +blue received pointerover 19 +blue received pointerenter 19 +blue received pointerdown 19 +blue received touchstart +green received pointerout 18 +green received pointerleave 18 +grey received pointerleave 18 +blue received gotpointercapture 18 +blue received pointerover 18 +blue received pointerenter 18 +blue received pointermove 18 +green received touchmove +blue received gotpointercapture 19 +blue received pointermove 19 +blue received touchmove + **** Move first touch to blue & second touch to green **** +blue received pointermove 18 +green received touchmove +blue received pointermove 19 +blue received touchmove + **** Cancel first touch **** +blue received pointercancel 18 +blue received lostpointercapture 18 +green received touchcancel + **** Jiggle second touch on green **** +blue received pointermove 19 +blue received touchmove + **** Cancel second touch **** +blue received pointercancel 19 +blue received pointerout 19 +blue received pointerleave 19 +blue received lostpointercapture 19 blue received touchcancel PASS successfullyParsed is true diff --git a/third_party/WebKit/LayoutTests/virtual/pointerevent/fast/events/pointerevents/touch-capture-in-iframe-expected.txt b/third_party/WebKit/LayoutTests/virtual/pointerevent/fast/events/pointerevents/touch-capture-in-iframe-expected.txt index 28cf572b46be7..54561b4a19b14 100644 --- a/third_party/WebKit/LayoutTests/virtual/pointerevent/fast/events/pointerevents/touch-capture-in-iframe-expected.txt +++ b/third_party/WebKit/LayoutTests/virtual/pointerevent/fast/events/pointerevents/touch-capture-in-iframe-expected.txt @@ -155,4 +155,148 @@ touchend is recieved with changedTouches.length=2: Touch with id=0 with target = outerFrame Touch with id=1 with target = outerFrame +==== Finger1 in innerFrame and Finger2 in outerFrame with releaseTouchCapture ==== +*** Put first finger down in innerFrame and move *** +innerFrame recieved pointerdown with id=10 +touchstart is recieved with changedTouches.length=1: + Touch with id=0 with target = innerFrame +innerFrame recieved gotpointercapture with id=10 +innerFrame recieved pointermove with id=10 +touchmove is recieved with changedTouches.length=1: + Touch with id=0 with target = innerFrame + +*** Put second finger in outerFrame and move *** +--- Release pointer capture for 11 --- +outerFrame recieved pointerdown with id=11 +outerFrame recieved pointermove with id=11 + +*** Move first finger to outerFrame *** +innerFrame recieved pointermove with id=10 +touchmove is recieved with changedTouches.length=1: + Touch with id=0 with target = innerFrame + +*** Move second finger to innerFrame *** +innerFrame recieved pointermove with id=11 + +*** Releasing fingers *** +innerFrame recieved pointerup with id=10 +innerFrame recieved lostpointercapture with id=10 +innerFrame recieved pointerup with id=11 +touchend is recieved with changedTouches.length=1: + Touch with id=0 with target = innerFrame + +==== Finger1 in outerFrame and Finger2 in innerFrame with releaseTouchCapture ==== +*** Put first finger down in outerFrame and move *** +--- Release pointer capture for 12 --- +outerFrame recieved pointerdown with id=12 +touchstart is recieved with changedTouches.length=1: + Touch with id=0 with target = outerFrame +outerFrame recieved pointermove with id=12 +touchmove is recieved with changedTouches.length=1: + Touch with id=0 with target = outerFrame + +*** Put second finger in innerFrame and move *** +innerFrame recieved pointerdown with id=13 +touchstart is recieved with changedTouches.length=1: + Touch with id=1 with target = innerFrameElement +innerFrame recieved gotpointercapture with id=13 +innerFrame recieved pointermove with id=13 +touchmove is recieved with changedTouches.length=1: + Touch with id=1 with target = innerFrameElement + +*** Move first finger to innerFrame *** +innerFrame recieved pointermove with id=12 +touchmove is recieved with changedTouches.length=1: + Touch with id=0 with target = outerFrame + +*** Move second finger to outerFrame *** +innerFrame recieved pointermove with id=13 +touchmove is recieved with changedTouches.length=1: + Touch with id=1 with target = innerFrameElement + +*** Releasing fingers *** +innerFrame recieved pointerup with id=12 +innerFrame recieved pointerup with id=13 +innerFrame recieved lostpointercapture with id=13 +touchend is recieved with changedTouches.length=2: + Touch with id=0 with target = outerFrame + Touch with id=1 with target = innerFrameElement +touchend is recieved with changedTouches.length=2: + Touch with id=0 with target = outerFrame + Touch with id=1 with target = innerFrameElement + +==== Finger1 in innerFrame and Finger2 in innerFrame with releaseTouchCapture ==== +*** Put first finger down in innerFrame and move *** +innerFrame recieved pointerdown with id=14 +touchstart is recieved with changedTouches.length=1: + Touch with id=0 with target = innerFrame +innerFrame recieved gotpointercapture with id=14 +innerFrame recieved pointermove with id=14 +touchmove is recieved with changedTouches.length=1: + Touch with id=0 with target = innerFrame + +*** Put second finger in innerFrame and move *** +innerFrame recieved pointerdown with id=15 +touchstart is recieved with changedTouches.length=1: + Touch with id=1 with target = innerFrame +innerFrame recieved gotpointercapture with id=15 +innerFrame recieved pointermove with id=15 +touchmove is recieved with changedTouches.length=1: + Touch with id=1 with target = innerFrame + +*** Move first finger to outerFrame *** +innerFrame recieved pointermove with id=14 +touchmove is recieved with changedTouches.length=1: + Touch with id=0 with target = innerFrame + +*** Move second finger to outerFrame *** +innerFrame recieved pointermove with id=15 +touchmove is recieved with changedTouches.length=1: + Touch with id=1 with target = innerFrame + +*** Releasing fingers *** +innerFrame recieved pointerup with id=14 +innerFrame recieved lostpointercapture with id=14 +innerFrame recieved pointerup with id=15 +innerFrame recieved lostpointercapture with id=15 +touchend is recieved with changedTouches.length=2: + Touch with id=0 with target = innerFrame + Touch with id=1 with target = innerFrame + +==== Finger1 in outerFrame and Finger2 in outerFrame with releaseTouchCapture ==== +*** Put first finger down in outerFrame and move *** +--- Release pointer capture for 16 --- +outerFrame recieved pointerdown with id=16 +touchstart is recieved with changedTouches.length=1: + Touch with id=0 with target = outerFrame +outerFrame recieved pointermove with id=16 +touchmove is recieved with changedTouches.length=1: + Touch with id=0 with target = outerFrame + +*** Put second finger in outerFrame and move *** +--- Release pointer capture for 17 --- +outerFrame recieved pointerdown with id=17 +touchstart is recieved with changedTouches.length=1: + Touch with id=1 with target = outerFrame +outerFrame recieved pointermove with id=17 +touchmove is recieved with changedTouches.length=1: + Touch with id=1 with target = outerFrame + +*** Move first finger to innerFrame *** +innerFrame recieved pointermove with id=16 +touchmove is recieved with changedTouches.length=1: + Touch with id=0 with target = outerFrame + +*** Move second finger to innerFrame *** +innerFrame recieved pointermove with id=17 +touchmove is recieved with changedTouches.length=1: + Touch with id=1 with target = outerFrame + +*** Releasing fingers *** +innerFrame recieved pointerup with id=16 +innerFrame recieved pointerup with id=17 +touchend is recieved with changedTouches.length=2: + Touch with id=0 with target = outerFrame + Touch with id=1 with target = outerFrame + diff --git a/third_party/WebKit/LayoutTests/virtual/pointerevent/fast/events/pointerevents/touch-capture-in-iframe.html b/third_party/WebKit/LayoutTests/virtual/pointerevent/fast/events/pointerevents/touch-capture-in-iframe.html index 29bcac73ca639..6e0caaef2721f 100644 --- a/third_party/WebKit/LayoutTests/virtual/pointerevent/fast/events/pointerevents/touch-capture-in-iframe.html +++ b/third_party/WebKit/LayoutTests/virtual/pointerevent/fast/events/pointerevents/touch-capture-in-iframe.html @@ -21,8 +21,13 @@
@@ -38,21 +43,33 @@ var innerFrameX = 200; var innerFrameY = 200; +function logEvent(event) { + if (event.type.includes('pointer')) { + debug(event.target.id + ' recieved ' + event.type + ' with id=' + event.pointerId); + } else if (event.type.startsWith('touch')) { + debug(event.type + ' is recieved with changedTouches.length=' + event.changedTouches.length + ':'); + for(var i=0; i