• rdevlin.cronin's avatar
    [Extensions] Remove UIThreadExtensionFunction::DelegateForTests · 187edaa9
    rdevlin.cronin authored
    The ExtensionFunction test delegate basically just served as a way of
    getting the results from the function, but we already have that by simply
    setting the response callback in the function. Remove the
    DelegateForTests class and update uses of it to use the callback.
    
    Also add a response() field on ExtensionFunction for use in determining
    if the function succeeded or failed. Previously, code would rely on
    whether or not results_ were set, but this was wrong for a few reasons:
    - The absence of results doesn't always indicate failure
    - The presence of results doesn't always indicate success
    - In practice, we always send back an empty list value (even if
      results weren't previously set).
    Update code to use the response() value instead.
    
    BUG=648276
    TBR=benwells@chromium.org (apps browsertest change)
    
    Review-Url: https://codereview.chromium.org/2348723002
    Cr-Commit-Position: refs/heads/master@{#419560}
    187edaa9
extension_function.cc 20.3 KB