Title: [263052] trunk/LayoutTests
- Revision
- 263052
- Author
- [email protected]
- Date
- 2020-06-15 12:20:34 -0700 (Mon, 15 Jun 2020)
Log Message
Add console logging to try and diagnose editing/deleting/ios/backspace-last-character.html
https://bugs.webkit.org/show_bug.cgi?id=213201
<rdar://problem/64165890>
Reviewed by Tim Horton.
Break the test down into more steps (namely, separate waiting for events from synthesizing key events), and add
a console log statement at each step.
* editing/deleting/ios/backspace-last-character-expected.txt:
* editing/deleting/ios/backspace-last-character.html:
Modified Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (263051 => 263052)
--- trunk/LayoutTests/ChangeLog 2020-06-15 19:07:20 UTC (rev 263051)
+++ trunk/LayoutTests/ChangeLog 2020-06-15 19:20:34 UTC (rev 263052)
@@ -1,3 +1,17 @@
+2020-06-15 Wenson Hsieh <[email protected]>
+
+ Add console logging to try and diagnose editing/deleting/ios/backspace-last-character.html
+ https://bugs.webkit.org/show_bug.cgi?id=213201
+ <rdar://problem/64165890>
+
+ Reviewed by Tim Horton.
+
+ Break the test down into more steps (namely, separate waiting for events from synthesizing key events), and add
+ a console log statement at each step.
+
+ * editing/deleting/ios/backspace-last-character-expected.txt:
+ * editing/deleting/ios/backspace-last-character.html:
+
2020-06-15 Diego Pino Garcia <[email protected]>
[WPE] Unreviewed test gardening. Update expected results of flaky image failures.
Modified: trunk/LayoutTests/editing/deleting/ios/backspace-last-character-expected.txt (263051 => 263052)
--- trunk/LayoutTests/editing/deleting/ios/backspace-last-character-expected.txt 2020-06-15 19:07:20 UTC (rev 263051)
+++ trunk/LayoutTests/editing/deleting/ios/backspace-last-character-expected.txt 2020-06-15 19:20:34 UTC (rev 263052)
@@ -1,9 +1,19 @@
+CONSOLE MESSAGE: Activating element and waiting for input session.
+CONSOLE MESSAGE: Waiting for element focus.
+CONSOLE MESSAGE: Typing 'w'.
+CONSOLE MESSAGE: Waiting for first input event.
+CONSOLE MESSAGE: Hitting backspace.
+CONSOLE MESSAGE: Waiting for second input event.
+CONSOLE MESSAGE: Test complete.
This tests using the software keyboard and pressing 'w' then backspace deletes the 'w' and does not cause an assertion failure in a debug build.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+PASS inputDidFocus became true
+PASS inputEventCount became 1
PASS document.getElementById("input").value is "w"
+PASS inputEventCount became 2
PASS document.getElementById("input").value is ""
PASS successfullyParsed is true
Modified: trunk/LayoutTests/editing/deleting/ios/backspace-last-character.html (263051 => 263052)
--- trunk/LayoutTests/editing/deleting/ios/backspace-last-character.html 2020-06-15 19:07:20 UTC (rev 263051)
+++ trunk/LayoutTests/editing/deleting/ios/backspace-last-character.html 2020-06-15 19:20:34 UTC (rev 263052)
@@ -13,6 +13,8 @@
window.jsTestIsAsync = true;
let input = document.getElementById("input");
+let inputDidFocus = false;
+let inputEventCount = 0;
function appendANewline()
{
@@ -22,22 +24,40 @@
async function runTest()
{
- if (window.testRunner)
+ input.addEventListener("focus", () => inputDidFocus = true);
+ input.addEventListener("input", () => ++inputEventCount);
+
+ if (window.testRunner) {
await UIHelper.setHardwareKeyboardAttached(false);
+ console.log("Activating element and waiting for input session.");
+ await UIHelper.activateElementAndWaitForInputSession(input);
+ }
- await UIHelper.callFunctionAndWaitForEvent(() => window.testRunner && UIHelper.activateElement(input), input, "focus");
+ console.log("Waiting for element focus.");
+ await new Promise(resolve => shouldBecomeEqual("inputDidFocus", "true", resolve));
- await UIHelper.callFunctionAndWaitForEvent(() => window.testRunner && UIHelper.keyDown("w"), input, "input");
+ console.log("Typing 'w'.");
+ if (window.testRunner)
+ await UIHelper.keyDown("w");
+
+ console.log("Waiting for first input event.");
+ await new Promise(resolve => shouldBecomeEqual("inputEventCount", "1", resolve));
shouldBeEqualToString('document.getElementById("input").value', "w");
- await UIHelper.callFunctionAndWaitForEvent(() => window.testRunner && UIHelper.keyDown("\b"), input, "input");
+ console.log("Hitting backspace.");
+ if (window.testRunner)
+ await UIHelper.keyDown("\b");
+
+ console.log("Waiting for second input event.");
+ await new Promise(resolve => shouldBecomeEqual("inputEventCount", "2", resolve));
shouldBeEqualToString('document.getElementById("input").value', "");
+ console.log("Test complete.");
document.body.removeChild(document.getElementById("test-container"));
finishJSTest();
}
-description("This tests using the software keyboard and pressing 'w' then <kbd>backspace</kbd> deletes the 'w' and does not cause an assertion failure in a debug build.")
+description("This tests using the software keyboard and pressing 'w' then <kbd>backspace</kbd> deletes the 'w' and does not cause an assertion failure in a debug build.");
input.addEventListener("keydown", appendANewline);
runTest();
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes