[Mac WK2] REGRESSION (r244182) editing/execCommand/change-list-type.html is a flaky...
authorrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 19 Apr 2019 19:55:58 +0000 (19:55 +0000)
committerrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 19 Apr 2019 19:55:58 +0000 (19:55 +0000)
https://bugs.webkit.org/show_bug.cgi?id=197065
<rdar://problem/50021964>

Reviewed by Wenson Hsieh.

Like r244461, this test was errornosuly assuming that rAF would be enough to close the undo group
in the UI process. Fixed the test by explicitly waiting for the runloop in the ui process to run
by executing a UI script.

* editing/execCommand/change-list-type.html:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244462 268f45cc-cd09-0410-ab3c-d52691b4dbfc

LayoutTests/ChangeLog
LayoutTests/editing/execCommand/change-list-type.html

index f55f3b8..f2a6709 100644 (file)
@@ -1,5 +1,19 @@
 2019-04-19  Ryosuke Niwa  <rniwa@webkit.org>
 
+        [Mac WK2] REGRESSION (r244182) editing/execCommand/change-list-type.html is a flaky failure
+        https://bugs.webkit.org/show_bug.cgi?id=197065
+        <rdar://problem/50021964>
+
+        Reviewed by Wenson Hsieh.
+
+        Like r244461, this test was errornosuly assuming that rAF would be enough to close the undo group
+        in the UI process. Fixed the test by explicitly waiting for the runloop in the ui process to run
+        by executing a UI script.
+
+        * editing/execCommand/change-list-type.html:
+
+2019-04-19  Ryosuke Niwa  <rniwa@webkit.org>
+
         REGRESSION: (r244182) Layout Test editing/execCommand/insert-nested-lists.html is flaky
         https://bugs.webkit.org/show_bug.cgi?id=196985
 
index cd4250e..745fe63 100644 (file)
         internals.changeSelectionListType();
         Markup.dump("top", "After changing the first sublist back to ordered");
 
+        await new Promise((resolve) => {
+            if (window.testRunner)
+                testRunner.runUIScript(`(function() { uiController.uiScriptComplete(); })()`, resolve);
+            else
+                setTimeout(resolve, 500);
+        });
+
         await new Promise(requestAnimationFrame);
         getSelection().setBaseAndExtent(five, 0, six, 1);
         internals.changeSelectionListType();