• Peter Kasting's avatar
    Split AshTestHelper setup and put some pieces in the constructor. · 9eaedfd9
    Peter Kasting authored
    This is yet more precursor work for making AshTestHelper an
    AuraTestHelper subclass.  It moves into the constructor things that
    are more "general-purpose" and don't rely on any state that might be
    customized after construction (e.g. reading the ViewsDelegate), and
    leaves SetUp() focused more on the ash-specific shell/windowing stuff.
    
    This changes the parameters passed to the constructor vs. setup, since
    ultimately some will be relevant to the Aura side and some won't.  For
    now, this requires storing the |context_factory_| on the object to
    pass it from the constructor to setup, but that will go away later.
    
    This also adds a no-args SetUp() function, which just calls the main
    SetUp() function.  This is a precursor to making SetUp() and TearDown()
    be virtual method overrides.
    
    A few other trivial changes:
    * Explicitly resets |session_controller_client_| during TearDown(),
      since I forgot that previously.  (Should have no effect)
    * Puts GetLocalStatePrefService() into the same order in the .cc file
      as the .h file.
    
    Should be no functional effects.
    
    Bug: none
    Change-Id: Ida64c3fc0779f3bb38a032cf8d3f490104fe88ab
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2124934
    Commit-Queue: Peter Kasting <pkasting@chromium.org>
    Reviewed-by: default avatarJames Cook <jamescook@chromium.org>
    Auto-Submit: Peter Kasting <pkasting@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#754707}
    9eaedfd9
ash_test_helper.h 5.11 KB