• Devlin Cronin's avatar
    [Extensions Menu] Clean up BrowserActionTestUtilViews · 794c0a7b
    Devlin Cronin authored
    Clean up the BrowserActionTestUtilViews implementation a bit.
    - Remove the TestToolbarActionsBarHelper base class from
      BrowserActionTestUtil; there's no need for it to be (conceptually)
      cross-platform.
    - Cache the BrowserActionsContainer pointer on the
      BrowserActionTestUtilViews instance to avoid always doing a look-up
      through the GetContainer() method (and remove GetContainer()).
    - Avoid caching the Browser on the object; it's only necessary for
      creating the overflow bar, and can be easily passed in to those calls
      (of which there are few).
    - Finesse the constructors to make it clear when a
      BrowserActionsContainer is owned (through a manufactured view) vs not
      (by accessing one on the BrowserWindow).
    
    Bug: 984654
    
    Change-Id: Ibab94e0562fd04026f1b2642d6dbc170c049ead4
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1877447
    Commit-Queue: Devlin <rdevlin.cronin@chromium.org>
    Reviewed-by: default avatarPeter Boström <pbos@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#709319}
    794c0a7b
browser_actions_bar_browsertest.cc 42 KB