• Jered Gray's avatar
    Fix flakiness in previews browsertests · ddd4f721
    Jered Gray authored
    The previous logic relied upon the hints requested by the store upon a
    navigation to a url being loaded prior to the commit. This was not
    guaranteed to happen when cores were not available on a machine for
    background threads.
    
    The HintCache has been modified so that it now runs the hint loaded
    callback even in the case where no hints are available for the host.
    
    Additionally, a histogram has been added that tracks the loading of
    hints from the hint cache store has in PreviewsOptimizationGuide. The
    tests now run a priming navigation that waits for the hints to be
    loaded. This ensures that the hints are guaranteed to be available
    during the tests.
    
    Bug: 923161
    Change-Id: I8b09dfc9391164f0a6d424ec0a8ea871334c4c8c
    Reviewed-on: https://chromium-review.googlesource.com/c/1423617
    Commit-Queue: Jered Gray <jegray@chromium.org>
    Reviewed-by: default avatarTarun Bansal <tbansal@chromium.org>
    Reviewed-by: default avatarDoug Arnett <dougarnett@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#625056}
    ddd4f721
previews_browsertest.cc 20.9 KB