Title: [256714] trunk/LayoutTests
- Revision
- 256714
- Author
- [email protected]
- Date
- 2020-02-16 13:47:54 -0800 (Sun, 16 Feb 2020)
Log Message
Add a layout test for <rdar://problem/59090510>
https://bugs.webkit.org/show_bug.cgi?id=207824
Reviewed by Anders Carlsson.
Add a layout test to verify that tapping near the caret rect in a focused input field still dispatches a click
event and brings up the keyboard.
* fast/events/ios/click-in-autofocused-input-when-tapping-near-caret-expected.txt: Added.
* fast/events/ios/click-in-autofocused-input-when-tapping-near-caret.html: Added.
Modified Paths
Added Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (256713 => 256714)
--- trunk/LayoutTests/ChangeLog 2020-02-16 20:58:46 UTC (rev 256713)
+++ trunk/LayoutTests/ChangeLog 2020-02-16 21:47:54 UTC (rev 256714)
@@ -1,3 +1,16 @@
+2020-02-16 Wenson Hsieh <[email protected]>
+
+ Add a layout test for <rdar://problem/59090510>
+ https://bugs.webkit.org/show_bug.cgi?id=207824
+
+ Reviewed by Anders Carlsson.
+
+ Add a layout test to verify that tapping near the caret rect in a focused input field still dispatches a click
+ event and brings up the keyboard.
+
+ * fast/events/ios/click-in-autofocused-input-when-tapping-near-caret-expected.txt: Added.
+ * fast/events/ios/click-in-autofocused-input-when-tapping-near-caret.html: Added.
+
2020-02-16 Dean Jackson <[email protected]>
Fix a typo and some merge conflict markers that
Added: trunk/LayoutTests/fast/events/ios/click-in-autofocused-input-when-tapping-near-caret-expected.txt (0 => 256714)
--- trunk/LayoutTests/fast/events/ios/click-in-autofocused-input-when-tapping-near-caret-expected.txt (rev 0)
+++ trunk/LayoutTests/fast/events/ios/click-in-autofocused-input-when-tapping-near-caret-expected.txt 2020-02-16 21:47:54 UTC (rev 256714)
@@ -0,0 +1,11 @@
+Verifies that tapping near the caret rect of an autofocused text field dispatches a click event and presents a keyboard when there is no hardware keyboard attached. To manually run the test, tap on the center of the input field. The keyboard should appear, and the callout bar should not be visible.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS clicked is true
+PASS showingMenu is false
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
Added: trunk/LayoutTests/fast/events/ios/click-in-autofocused-input-when-tapping-near-caret.html (0 => 256714)
--- trunk/LayoutTests/fast/events/ios/click-in-autofocused-input-when-tapping-near-caret.html (rev 0)
+++ trunk/LayoutTests/fast/events/ios/click-in-autofocused-input-when-tapping-near-caret.html 2020-02-16 21:47:54 UTC (rev 256714)
@@ -0,0 +1,56 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <meta name="viewport" content="width=device-width, initial-scale=1">
+ <script src=""
+ <script src=""
+ <style>
+ input {
+ width: 100px;
+ height: 100px;
+ font-size: 50px;
+ text-align: center;
+ }
+ </style>
+</head>
+<body>
+ <input autofocus>
+</body>
+<script>
+jsTestIsAsync = true;
+clicked = false;
+
+description("Verifies that tapping near the caret rect of an autofocused text field dispatches a click event and presents a keyboard when there is no hardware keyboard attached. To manually run the test, tap on the center of the input field. The keyboard should appear, and the callout bar should not be visible.");
+
+const input = document.querySelector("input");
+input.addEventListener("click", () => clicked = true);
+
+addEventListener("load", async () => {
+ await UIHelper.setHardwareKeyboardAttached(false);
+
+ const elementRect = input.getBoundingClientRect();
+ const centerX = elementRect.left + elementRect.width / 2;
+ const centerY = elementRect.top + elementRect.height / 2;
+
+ // The bug that inspired this test only reproduces if the touch duration exceeds 30 ms, plus the time needed for UIKit
+ // to schedule a gesture recognizer environment update. To simulate this, delay the end of the touch by 50 ms.
+ await UIHelper.sendEventStream(new UIHelper.EventStreamBuilder()
+ .begin(centerX, centerY)
+ .move(centerX, centerY + 1, 0.05)
+ .end()
+ .takeResult());
+
+ while (!(await UIHelper.isShowingKeyboard()))
+ continue;
+
+ input.blur();
+ shouldBeTrue("clicked");
+
+ showingMenu = await UIHelper.isShowingMenu();
+ shouldBeFalse("showingMenu");
+
+ await UIHelper.waitForKeyboardToHide();
+ finishJSTest();
+});
+</script>
+</html>
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes