WebKit Bugzilla
Attachment 370990 Details for
Bug 198397
: Fix double tap selection layout tests
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-198397-20190530161654.patch (text/plain), 7.86 KB, created by
Megan Gardner
on 2019-05-30 16:16:55 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Megan Gardner
Created:
2019-05-30 16:16:55 PDT
Size:
7.86 KB
patch
obsolete
>Subversion Revision: 245892 >diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog >index 39889c276a04dcc6adc98d371524a5de1762a160..39c906c8964d3c9e396fd0b4f0a41d527ebd6a6a 100644 >--- a/LayoutTests/ChangeLog >+++ b/LayoutTests/ChangeLog >@@ -1,3 +1,23 @@ >+2019-05-30 Megan Gardner <megan_gardner@apple.com> >+ >+ Fix double tap selection layout tests >+ https://bugs.webkit.org/show_bug.cgi?id=198397 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Create slower, more human accurate double tap gesture synthesizers. These are needed to more accurantly >+ work with the gesture recogizers in UIKit and WebKit to create correct text selection tests. >+ >+ * fast/events/touch/ios/double-tap-on-editable-content-for-selection-then-drag-down-to-change-selected-text.html: >+ * resources/basic-gestures.js: >+ (return.new.Promise.): >+ (return.new.Promise): >+ * resources/ui-helper.js: >+ (window.UIHelper.touchDownAt.return.new.Promise): >+ (window.UIHelper.touchDownAt): >+ (window.UIHelper.liftUpAt.return.new.Promise): >+ (window.UIHelper.liftUpAt): >+ > 2019-05-30 Jer Noble <jer.noble@apple.com> > > Video playback in Safari should continue when CarPlay is plugged in >diff --git a/LayoutTests/fast/events/touch/ios/double-tap-on-editable-content-for-selection-then-drag-down-to-change-selected-text.html b/LayoutTests/fast/events/touch/ios/double-tap-on-editable-content-for-selection-then-drag-down-to-change-selected-text.html >index f9ce1a0ca671fb98bf656f995dcc5908f62af045..952d156c7600dd7f94cff205df80a54e2e10ac66 100644 >--- a/LayoutTests/fast/events/touch/ios/double-tap-on-editable-content-for-selection-then-drag-down-to-change-selected-text.html >+++ b/LayoutTests/fast/events/touch/ios/double-tap-on-editable-content-for-selection-then-drag-down-to-change-selected-text.html >@@ -40,7 +40,7 @@ > > await didShowKeyboard(); > >- await doubleTapAtPoint(doubleTapPointX, doubleTapPointY); >+ await doubleTapAtPointFullHumanStream(doubleTapPointX, doubleTapPointY); > if (document.getSelection().toString() == "sed") > output += 'PASS: Correct Selection'; > else >diff --git a/LayoutTests/resources/basic-gestures.js b/LayoutTests/resources/basic-gestures.js >index 038fceadfb41f23032f826fe607c83a9587986b5..1d5dd564150b3750a7b54f36828faaf98ceb567c 100644 >--- a/LayoutTests/resources/basic-gestures.js >+++ b/LayoutTests/resources/basic-gestures.js >@@ -63,6 +63,128 @@ function liftUpAtPoint(x, y) > }); > } > >+function tapAtPointFullHumanStream(x, y) >+{ >+ return new Promise(resolve => { >+ testRunner.runUIScript(` >+ (function() { >+ var eventStream = { >+ events : [ >+ >+ { >+ inputType : "hand", >+ timeOffset : 0, >+ coordinateSpace : "content", >+ touches : [ >+ { >+ inputType : "finger", >+ phase : "began", >+ id : 1, >+ x : ${x}, >+ y : ${y}, >+ pressure : 0 >+ } >+ ] >+ }, >+ { >+ inputType : "hand", >+ timeOffset : 0.05, >+ coordinateSpace : "content", >+ touches : [ >+ { >+ inputType : "finger", >+ phase : "ended", >+ id : 1, >+ x : ${x}, >+ y : ${y}, >+ pressure : 0 >+ } >+ ] >+ } >+ ]}; >+ >+ uiController.sendEventStream(JSON.stringify(eventStream), function() {}); >+ uiController.uiScriptComplete(); >+ })();`, resolve); >+ }); >+} >+ >+function doubleTapAtPointFullHumanStream(x, y) >+{ >+ return new Promise(resolve => { >+ testRunner.runUIScript(` >+ (function() { >+ var eventStream = { >+ events : [ >+ >+ { >+ inputType : "hand", >+ timeOffset : 0, >+ coordinateSpace : "content", >+ touches : [ >+ { >+ inputType : "finger", >+ phase : "began", >+ id : 1, >+ x : ${x}, >+ y : ${y}, >+ pressure : 0 >+ } >+ ] >+ }, >+ { >+ inputType : "hand", >+ timeOffset : 0.05, >+ coordinateSpace : "content", >+ touches : [ >+ { >+ inputType : "finger", >+ phase : "ended", >+ id : 1, >+ x : ${x}, >+ y : ${y}, >+ pressure : 0 >+ } >+ ] >+ }, >+ { >+ inputType : "hand", >+ timeOffset : 0.2, >+ coordinateSpace : "content", >+ touches : [ >+ { >+ inputType : "finger", >+ phase : "began", >+ id : 1, >+ x : ${x}, >+ y : ${y}, >+ pressure : 0 >+ } >+ ] >+ }, >+ { >+ inputType : "hand", >+ timeOffset : 0.25, >+ coordinateSpace : "content", >+ touches : [ >+ { >+ inputType : "finger", >+ phase : "ended", >+ id : 1, >+ x : ${x}, >+ y : ${y}, >+ pressure : 0 >+ } >+ ] >+ } >+ ]}; >+ >+ uiController.sendEventStream(JSON.stringify(eventStream), function() {}); >+ uiController.uiScriptComplete(); >+ })();`, resolve); >+ }); >+} >+ > function longPressAndHoldAtPoint(x, y) > { > return new Promise(resolve => { >diff --git a/LayoutTests/resources/ui-helper.js b/LayoutTests/resources/ui-helper.js >index 0bd5aba756933bf434cdea318a2abd607d0c278a..cf95bdd477027f2474351f504fcb870eb384fe7c 100644 >--- a/LayoutTests/resources/ui-helper.js >+++ b/LayoutTests/resources/ui-helper.js >@@ -29,6 +29,26 @@ window.UIHelper = class UIHelper { > eventSender.mouseUp(); > } > >+ static touchDownAt(x, y) >+ { >+ return new Promise((resolve) => { >+ testRunner.runUIScript(` >+ uiController.touchDownAtPoint(${x}, ${y}, function() { >+ uiController.uiScriptComplete(); >+ });`, resolve); >+ }); >+ } >+ >+ static liftUpAt(x, y) >+ { >+ return new Promise((resolve) => { >+ testRunner.runUIScript(` >+ uiController.liftUpAtPoint(${x}, ${y}, function() { >+ uiController.uiScriptComplete(); >+ });`, resolve); >+ }); >+ } >+ > static tapAt(x, y, modifiers=[]) > { > console.assert(this.isIOS());
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
ews-watchlist
:
commit-queue-
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 198397
: 370990 |
371017