Bug 193238 - [iOS] editing/selection/ios/show-selection-in-empty-overflow-hidden-document.html often times out in internal automation
Summary: [iOS] editing/selection/ios/show-selection-in-empty-overflow-hidden-document....
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: HTML Editing (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Wenson Hsieh
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2019-01-08 08:25 PST by Wenson Hsieh
Modified: 2019-01-09 07:25 PST (History)
7 users (show)

See Also:


Attachments
Patch (1.90 KB, patch)
2019-01-08 21:04 PST, Wenson Hsieh
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Wenson Hsieh 2019-01-08 08:25:12 PST
The layout test editing/selection/ios/show-selection-in-empty-overflow-hidden-document.html occasionally times out in internal automation.
Comment 1 Wenson Hsieh 2019-01-08 15:15:25 PST
I can reproduce this timeout locally once every 100-or-so runs (using --repeat-each).
Comment 2 Wenson Hsieh 2019-01-08 16:07:24 PST
From logging captured during one of these failures, it looks like we're sending the right information (i.e. caret rect) to the UI process and then telling our text interaction assistant to re-layout its subviews, but for some reason the caret view doesn't appear in the view hierarchy after all this.
Comment 3 Wenson Hsieh 2019-01-08 20:59:51 PST
...as it turns out, I did *not* intend for runTest() to be invoked twice in this layout test 🤦🏻‍♂️

addEventListener("load", runTest);
jsTestIsAsync = true;
…
async function runTest() {
    …
}
</script>
</head>
<body>
…
    <iframe id="frame" srcdoc="<textarea id='editor'></textarea>" onload="runTest()">

Removing the redundant onload="runTest()" from the iframe element fixes the flakiness for me locally.
Comment 4 Wenson Hsieh 2019-01-08 21:04:26 PST
Created attachment 358669 [details]
Patch
Comment 5 Wenson Hsieh 2019-01-09 06:58:35 PST
Comment on attachment 358669 [details]
Patch

Thanks for the review!
Comment 6 WebKit Commit Bot 2019-01-09 07:24:44 PST
Comment on attachment 358669 [details]
Patch

Clearing flags on attachment: 358669

Committed r239771: <https://trac.webkit.org/changeset/239771>
Comment 7 WebKit Commit Bot 2019-01-09 07:24:45 PST
All reviewed patches have been landed.  Closing bug.
Comment 8 Radar WebKit Bug Importer 2019-01-09 07:25:28 PST
<rdar://problem/47146052>