• Stephane Zermatten's avatar
    [Autofill Assistant] Immediately report an error for "no script". · 14482fc2
    Stephane Zermatten authored
    Before this change, when there were no matching scripts for a page, or
    when fetching scripts failed, the client would wait always 20s before
    displaying an error message.
    
    With this change, the client complains as soon as it's clear that there
    are no scripts for the current page and that there cannot be any on the
    current URL.
    
    This change updates the way the case where we don't have a committed URL
    yet is handled, to avoid ever checking scripts with an empty URL. Before
    this change, the first run of CheckScripts would almost always run
    against an empty URL, so all preconditions would fail. With this change,
    the first run of CheckScripts runs with the initial URL, the one passed
    to CCT.
    
    This change updates most test in ControllerTest, which were written in
    such a way as to always start with a no-script answer.
    
    Bug: 806868
    Change-Id: I819fce0aadf4263ea0d17e8d58bd4371d5beec00
    Reviewed-on: https://chromium-review.googlesource.com/c/1486274
    Commit-Queue: Stephane Zermatten <szermatt@chromium.org>
    Reviewed-by: default avatarMathias Carlen <mcarlen@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#635563}
    14482fc2
script_tracker.h 6.88 KB