Title: [247030] trunk/LayoutTests
Revision
247030
Author
[email protected]
Date
2019-07-01 15:32:15 -0700 (Mon, 01 Jul 2019)

Log Message

[iOS 13] editing/selection/ios/dispatch-mouse-events-when-modifying-selection-quirk.html fails on trunk
https://bugs.webkit.org/show_bug.cgi?id=199384

Reviewed by Tim Horton.

Adjust this test to show the callout menu by tapping on the caret rect, rather than the center of the editable
area. Currently, tapping the center of the editable area twice results in a double tap, which fails to trigger
the callout bar.

* editing/selection/ios/dispatch-mouse-events-when-modifying-selection-quirk.html:

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (247029 => 247030)


--- trunk/LayoutTests/ChangeLog	2019-07-01 22:27:07 UTC (rev 247029)
+++ trunk/LayoutTests/ChangeLog	2019-07-01 22:32:15 UTC (rev 247030)
@@ -1,3 +1,16 @@
+2019-07-01  Wenson Hsieh  <[email protected]>
+
+        [iOS 13] editing/selection/ios/dispatch-mouse-events-when-modifying-selection-quirk.html fails on trunk
+        https://bugs.webkit.org/show_bug.cgi?id=199384
+
+        Reviewed by Tim Horton.
+
+        Adjust this test to show the callout menu by tapping on the caret rect, rather than the center of the editable
+        area. Currently, tapping the center of the editable area twice results in a double tap, which fails to trigger
+        the callout bar.
+
+        * editing/selection/ios/dispatch-mouse-events-when-modifying-selection-quirk.html:
+
 2019-07-01  Chris Dumez  <[email protected]>
 
         It should not be possible to trigger a load while in the middle of restoring a page in PageCache

Modified: trunk/LayoutTests/editing/selection/ios/dispatch-mouse-events-when-modifying-selection-quirk.html (247029 => 247030)


--- trunk/LayoutTests/editing/selection/ios/dispatch-mouse-events-when-modifying-selection-quirk.html	2019-07-01 22:27:07 UTC (rev 247029)
+++ trunk/LayoutTests/editing/selection/ios/dispatch-mouse-events-when-modifying-selection-quirk.html	2019-07-01 22:32:15 UTC (rev 247030)
@@ -41,6 +41,15 @@
 addEventListener("mousemove", recordEvent);
 addEventListener("mouseup", recordEvent);
 
+async function waitForCaretToAppear()
+{
+    while (true) {
+        const rect = await UIHelper.getUICaretViewRect();
+        if (rect && rect.top && rect.left && rect.width > 0 && rect.height > 0)
+            return rect;
+    }
+}
+
 async function waitForSelectionToAppear()
 {
     while (true) {
@@ -63,7 +72,8 @@
     debug("\nAttempting to show the callout bar.");
     const editor = document.querySelector(".editor");
     await UIHelper.activateElementAndWaitForInputSession(editor);
-    await UIHelper.activateElement(editor);
+    const [caretX, caretY] = midPointOfRect(await waitForCaretToAppear());
+    await UIHelper.activateAt(caretX, caretY);
     await UIHelper.waitForMenuToShow();
     testPassed("Displayed the callout bar.");
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to