Bug 207066 - [ macOS wk1 ] editing/execCommand/insert-nested-lists.html is flaky failing
Summary: [ macOS wk1 ] editing/execCommand/insert-nested-lists.html is flaky failing
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: HTML Editing (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2020-01-31 13:13 PST by Jacob Uphoff
Modified: 2020-04-02 14:56 PDT (History)
5 users (show)

See Also:


Attachments
Update Test Expectations (1.61 KB, patch)
2020-01-31 13:16 PST, Jacob Uphoff
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jacob Uphoff 2020-01-31 13:13:22 PST
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
Comment 1 Jacob Uphoff 2020-01-31 13:16:55 PST
Created attachment 389398 [details]
Update Test Expectations
Comment 2 Radar WebKit Bug Importer 2020-01-31 13:21:35 PST
<rdar://problem/59072372>
Comment 3 Truitt Savell 2020-01-31 13:25:15 PST
Comment on attachment 389398 [details]
Update Test Expectations

Clearing flags on attachment: 389398

Committed r255520: <https://trac.webkit.org/changeset/255520>
Comment 4 Alexey Proskuryakov 2020-02-01 18:26:06 PST
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);
    });
Comment 5 Ryosuke Niwa 2020-04-02 14:09:54 PDT
(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.
Comment 6 Wenson Hsieh 2020-04-02 14:56:59 PDT
(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?