RESOLVED FIXED208214
TestWebKitAPI.PasteMixedContent.CopyAndPasteWithCustomPasteboardDataOnly should wait until copy operation completes
https://bugs.webkit.org/show_bug.cgi?id=208214
Summary TestWebKitAPI.PasteMixedContent.CopyAndPasteWithCustomPasteboardDataOnly shou...
Daniel Bates
Reported 2020-02-25 12:48:50 PST
The test TestWebKitAPI.PasteMixedContent.CopyAndPasteWithCustomPasteboardDataOnly copies text from one web view and pastes it into another, but it neither waits until the copy operation completes nor does it ensure that this operation completed successfully. As a result, the test is timing dependent, aka flaky.
Attachments
Patch (2.55 KB, patch)
2020-02-25 12:50 PST, Daniel Bates
no flags
To land (2.16 KB, patch)
2020-02-25 14:10 PST, Daniel Bates
no flags
Daniel Bates
Comment 1 2020-02-25 12:50:53 PST
Daniel Bates
Comment 2 2020-02-25 12:55:53 PST
We don't need to explicitly wait for select all and paste operations because we implicit wait for them by virtue of sending additional web page messages. Specifically, do not need to wait for select all to complete before executing copy because the WebProcess is guaranteed to receive these requests in order. Similar argument for why there is no need to wait for paste.
Wenson Hsieh
Comment 3 2020-02-25 13:52:34 PST
Comment on attachment 391676 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=391676&action=review Good catch! > Tools/TestWebKitAPI/Tests/WebKitCocoa/PasteMixedContent.mm:-316 > - [source _executeEditCommand:@"copy" argument:nil completion:nil]; Nit - it would probably be simpler to just call -_synchronouslyExecuteEditCommand:argument:.
Daniel Bates
Comment 4 2020-02-25 14:06:58 PST
Comment on attachment 391676 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=391676&action=review Thanks for the review. >> Tools/TestWebKitAPI/Tests/WebKitCocoa/PasteMixedContent.mm:-316 >> - [source _executeEditCommand:@"copy" argument:nil completion:nil]; > > Nit - it would probably be simpler to just call -_synchronouslyExecuteEditCommand:argument:. !! I didn't know about this. !!
Daniel Bates
Comment 5 2020-02-25 14:10:21 PST
Daniel Bates
Comment 6 2020-02-25 14:11:35 PST
All reviewed patches have been landed. Closing bug.
Daniel Bates
Comment 7 2020-02-25 14:11:58 PST
Radar WebKit Bug Importer
Comment 8 2020-02-25 14:12:15 PST
Note You need to log in before you can comment on or make changes to this bug.