• Eugene But's avatar
    Return bool from PurgeCachedWebViewPages() helper. · f3163e20
    Eugene But authored
    PurgeCachedWebViewPages() is presumably fail to wait for pageload and
    -[ChromeEarlGrey waitForPageToFinishLoading] causes assert. Because
    PurgeCachedWebViewPages() is called multiple times inside a single test
    it's unclear where the bug actually happens. And the test only fails on
    bots, so the logs are the only way to debug the failure.
    
    This CL makes PurgeCachedWebViewPages() return bool, which pushes assert
    call up to the test, which should clarify the failure point.
    
    PurgeCachedWebViewPages() now uses
    chrome_test_util::WaitForPageToFinishLoading helper function, because
    -[ChromeEarlGrey waitForPageToFinishLoading] is not suppose to return
    bool result. -[ChromeEarlGrey waitForPageToFinishLoading] now uses
    chrome_test_util::WaitForPageToFinishLoading as well to avoid code
    duplication.
    
    Bug: 785025
    Cq-Include-Trybots: master.tryserver.chromium.mac:ios-simulator-cronet;master.tryserver.chromium.mac:ios-simulator-full-configs
    Change-Id: I4e45d30394609825fe9974e0d4077918563295cc
    Reviewed-on: https://chromium-review.googlesource.com/780388Reviewed-by: default avatarEugene But <eugenebut@chromium.org>
    Reviewed-by: default avatarMike Baxley <baxley@chromium.org>
    Commit-Queue: Eugene But <eugenebut@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#518434}
    f3163e20
visible_url_egtest.mm 24.6 KB