Followup to [iOS] TestWebKitAPI.PasteImage tests are flaky failures
authorwenson_hsieh@apple.com <wenson_hsieh@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 30 Aug 2018 22:50:33 +0000 (22:50 +0000)
committerwenson_hsieh@apple.com <wenson_hsieh@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 30 Aug 2018 22:50:33 +0000 (22:50 +0000)
commit0e346580164390cf2d14d01f849f67aa7f9b2b1a
tree01e724a3be737e48aa99ddeae9d4ae57a75d1b60
parent4b708753c954565f1ad64c4361e5a613d8cc97b5
Followup to [iOS] TestWebKitAPI.PasteImage tests are flaky failures
https://bugs.webkit.org/show_bug.cgi?id=185965

Reviewed by Andy Estes.

The first attempt to fix these flaky tests on iOS caused timeouts on macOS while waiting for a "loaded" message
from the page. To (hopefully) fix this across both platforms, make sure that we first register our script
message handlers in the UI process *before* evaluating script that could propagate the script message.

* TestWebKitAPI/Tests/WebKitCocoa/PasteImage.mm:
(-[TestWKWebView waitForMessage:afterEvaluatingScript:]):
(TEST):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@235528 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Tools/ChangeLog
Tools/TestWebKitAPI/Tests/WebKitCocoa/PasteImage.mm