editing/execCommand/insert-nested-lists.html This flaky failure has been happening for all visible history on Catalina and Mojave I was able to reproduce by running the test in iterations History: https://results.webkit.org/?suite=layout-tests&test=editing%2FexecCommand%2Finsert-nested-lists.html Diff: https://build.webkit.org/results/Apple-Catalina-Debug-WK1-Tests/r255510%20(2186)/editing/execCommand/insert-nested-lists-diff.txt
Created attachment 389398 [details] Update Test Expectations
<rdar://problem/59072372>
Comment on attachment 389398 [details] Update Test Expectations Clearing flags on attachment: 389398 Committed r255520: <https://trac.webkit.org/changeset/255520>
Presumably this part is insufficient to deflake it? // By default, AppKit on macOS coalesces undo operations that occur within the same runloop. Wait until the next // runloop before inserting another unordered list to ensure that it gets its own entry in the undo stack. await new Promise((resolve) => { if (window.testRunner) testRunner.runUIScript(`(function() { uiController.uiScriptComplete(); })()`, resolve); else setTimeout(resolve, 500); });
(In reply to Alexey Proskuryakov from comment #4) > Presumably this part is insufficient to deflake it? > > // By default, AppKit on macOS coalesces undo operations that occur > within the same runloop. Wait until the next > // runloop before inserting another unordered list to ensure that it > gets its own entry in the undo stack. > await new Promise((resolve) => { > if (window.testRunner) > testRunner.runUIScript(`(function() { > uiController.uiScriptComplete(); })()`, resolve); > else > setTimeout(resolve, 500); > }); Hm... going to the UI script in theory should be sufficient but I guess not.
(In reply to Ryosuke Niwa from comment #5) > (In reply to Alexey Proskuryakov from comment #4) > > Presumably this part is insufficient to deflake it? > > > > // By default, AppKit on macOS coalesces undo operations that occur > > within the same runloop. Wait until the next > > // runloop before inserting another unordered list to ensure that it > > gets its own entry in the undo stack. > > await new Promise((resolve) => { > > if (window.testRunner) > > testRunner.runUIScript(`(function() { > > uiController.uiScriptComplete(); })()`, resolve); > > else > > setTimeout(resolve, 500); > > }); > > Hm... going to the UI script in theory should be sufficient but I guess not. Iām not sure if runUIScript is sufficient to ensure that the we proceed after the next runloop in WebKit1. Maybe we need to call uiController.doAsyncTask() instead?