• Bret Sepulveda's avatar
    Convert ToolbarActionsBarUnitTest tests for ExtensionsToolbarMenu. · 9761cac4
    Bret Sepulveda authored
    This patch rewrites all the tests in ToolbarActionsBarUnitTest that are
    relevant to the new UI into ExtensionsMenuViewUnitTest:
    * BasicToolbarActionsBarTest is converted to
      PinnedExtensionAppearsInToolbar and ReorderPinnedExtensions. Since
      ExtensionsToolbarContainer does not shrink to fit available space,
      that part of the test has not been converted.
    * ToolbarActionsReorderOnPrefChange is converted to
      PinnedExtensionsReorderOnPrefChange.
    * TestHighlightMode is not converted because highlight mode is not
      yet supported on the new UI.
    * The relevant part of TestActionFrameBounds is converted to
      PinnedExtensionLayout.
    * TestStartAndEndIndexes is not converted because
      ExtensionsToolbarContainer cannot be manually shrunk.
    * TestNeedsOverflow is not converted because there is no "overflow"
      container in the new UI.
    * ReuploadExtensionFailed is converted and split into two tests:
      ReloadExtension and ReloadExtensionFailed.
    
    This patch also disables the kExtensionsToolbarMenu feature for the
    ToolbarActionsBarUnitTest suite, so they will now pass when the feature
    is enabled by default.
    
    Bug: 984654
    Change-Id: I287efbbe916354d7572ec0ea684cce86777213f5
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1930816
    Commit-Queue: Bret Sepulveda <bsep@chromium.org>
    Reviewed-by: default avatarDevlin <rdevlin.cronin@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#719138}
    9761cac4
toolbar_actions_bar_unittest.cc 28.4 KB