Wait for focus before invoking document.hasFocus().
I'm not sure whether it should be this way - maybe waiting for the page load (WaitForPageLoad) should imply waiting for the focus as well; but this does fix the previously flaky test. I've clarified the name of the test also, since all this does is to show that the two HeadlessWebContents instances are independently focused at the same time. R=caseq@chromium.com, eseckler@chromium.com Bug: 828042 Change-Id: I174863b49ae525605a6aacb8750880d02fae3246 Reviewed-on: https://chromium-review.googlesource.com/1026993Reviewed-by:Eric Seckler <eseckler@chromium.org> Reviewed-by:
Andrey Kosyakov <caseq@chromium.org> Commit-Queue: Johannes Henkel <johannes@google.com> Cr-Commit-Position: refs/heads/master@{#553627}
Showing
Please register or sign in to comment