fast/events/ios/forward-delete-in-editable.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=203049
<rdar://problem/52969457>

Reviewed by Wenson Hsieh.

Now that <rdar://problem/45772078> is fixed we can write the test such that we check the test
result after we receive a DOM key up for the forward delete. Currently the test makes use of a
workaround that incorrectly assumes that the keyboard will call back into WebKit to perform the
forward deletion before the web process blur()s the field. This is not guaranteed to happen.
Instead wait until we receive a DOM key up for the delete key.

* fast/events/ios/forward-delete-in-editable.html:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@251301 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 9ae09e1..b83fc6a45 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,5 +1,21 @@
 2019-10-18  Daniel Bates  <dabates@apple.com>
 
+        fast/events/ios/forward-delete-in-editable.html is a flaky failure
+        https://bugs.webkit.org/show_bug.cgi?id=203049
+        <rdar://problem/52969457>
+
+        Reviewed by Wenson Hsieh.
+
+        Now that <rdar://problem/45772078> is fixed we can write the test such that we check the test
+        result after we receive a DOM key up for the forward delete. Currently the test makes use of a
+        workaround that incorrectly assumes that the keyboard will call back into WebKit to perform the
+        forward deletion before the web process blur()s the field. This is not guaranteed to happen.
+        Instead wait until we receive a DOM key up for the delete key.
+
+        * fast/events/ios/forward-delete-in-editable.html:
+
+2019-10-18  Daniel Bates  <dabates@apple.com>
+
         Layout Test http/tests/security/contentSecurityPolicy/iframe-allowed-when-loaded-via-javascript-url.html is flaky
         https://bugs.webkit.org/show_bug.cgi?id=202481
         <rdar://problem/55916200>
diff --git a/LayoutTests/fast/events/ios/forward-delete-in-editable.html b/LayoutTests/fast/events/ios/forward-delete-in-editable.html
index a93b9b7..29c9c13 100644
--- a/LayoutTests/fast/events/ios/forward-delete-in-editable.html
+++ b/LayoutTests/fast/events/ios/forward-delete-in-editable.html
@@ -24,17 +24,15 @@
         inputElement.setSelectionRange(0, 0);
         return;
     }
-    // FIXME: We cannot listen for a keyup event because the forward delete key does not generate one
-    // due to <rdar://problem/45772078>. So, we listen for a blur event.
-    inputElement.addEventListener("blur", checkResultAndNotifyDone, {once: true});
+    inputElement.addEventListener("keyup", checkResultAndNotifyDone, {once: true});
     await UIHelper.activateFormControl(inputElement);
     inputElement.setSelectionRange(0, 0);
     await UIHelper.typeCharacter("forwardDelete");
-    inputElement.blur();
 }
 
-function checkResultAndNotifyDone()
+function checkResultAndNotifyDone(keyEvent)
 {
+    console.assert(keyEvent.key === "Delete");
     shouldBeEqualToString('document.getElementById("input").value', "ext");
     document.body.removeChild(document.getElementById("test-container"));
     finishJSTest();