[ios] Fixes ios_web_shell_egtests on device.

GREYAssert(condition) does not wait for the app to idle before
evaluating its condition and continuing.  This was leading to test
failures on device.  Instead, reformulate code to look like:

bool success = condition;


Change-Id: I0ea6e7253b0317b7fcd7f8e924292d4cedfb6c7c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1535028
Auto-Submit: Rohit Rao <rohitrao@chromium.org>
Reviewed-by: Justin Cohen <justincohen@chromium.org>
Commit-Queue: Rohit Rao <rohitrao@chromium.org>
Cr-Commit-Position: refs/heads/master@{#643364}
2 files changed