[JJI] Don't use evaluateJavascript() to validate test
Event listeners for the injected JS object are different from evaluateJavascript() in a way that evaluateJavascript() will execute the JavaScript immediately when it reaches to the renderer, however JJI's event listener posted to the event loop asynchronously. So we can't expect that a listener is executed before evaluateJavascript(). This CL changed the validation to relying on the async call of the listeners instead of using evaluateJavascript(). Bug: 1015023 Test: Run both tests locally 1000 times, didn't see any failure. Change-Id: I1434b43f5dbc7f2700580c9c053453f5d20398c3 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1894248 Commit-Queue: Shimi Zhang <ctzsm@chromium.org> Reviewed-by:Richard Coles <torne@chromium.org> Reviewed-by:
Changwan Ryu <changwan@chromium.org> Cr-Commit-Position: refs/heads/master@{#712345}
Showing
Please register or sign in to comment