Bug 195160

Summary: Several PasteImage API tests are flaky
Product: WebKit Reporter: Aakash Jain <aakash_jain>
Component: Tools / TestsAssignee: Wenson Hsieh <wenson_hsieh>
Status: RESOLVED FIXED    
Severity: Normal CC: aakash_jain, ap, bdakin, commit-queue, lforschler, rniwa, thorton, webkit-bot-watchers-bugzilla, webkit-bug-importer, wenson_hsieh
Priority: P2 Keywords: InRadar
Version: Other   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch none

Description Aakash Jain 2019-02-28 05:55:23 PST
TestWebKitAPI.PasteImage.PastePNGFile seems flaky. In https://ews-build.webkit-uat.org/#/builders/19/builds/1307, the test Passed in run-api-tests step. However, in the immediately next retry step (re-run-api-tests), it failed.
Comment 1 Wenson Hsieh 2019-02-28 07:29:11 PST
Unlike PasteImage.PasteTIFFImage, this one is timing out.

It looks like this one might be racy, since it inserts the image and then registers a "load" event handler. If the image fires a load event /before/ the handler is registered,  we'll end up waiting forever for image load.

Seems like this should probably use -waitForMessage:afterEvaluatingScript: instead, which first registers the handler and then evaluates script.
Comment 2 Wenson Hsieh 2019-02-28 08:53:22 PST
*** Bug 195157 has been marked as a duplicate of this bug. ***
Comment 3 Wenson Hsieh 2019-02-28 08:53:57 PST
Created attachment 363224 [details]
Patch
Comment 4 WebKit Commit Bot 2019-02-28 12:52:54 PST
Comment on attachment 363224 [details]
Patch

Clearing flags on attachment: 363224

Committed r242216: <https://trac.webkit.org/changeset/242216>
Comment 5 WebKit Commit Bot 2019-02-28 12:52:56 PST
All reviewed patches have been landed.  Closing bug.
Comment 6 Radar WebKit Bug Importer 2019-02-28 12:53:18 PST
<rdar://problem/48484916>