#include "chrome/browser/ui/views/bookmarks/saved_tab_groups/saved_tab_group_bar.h"
#include <memory>
#include <optional>
#include "base/test/scoped_feature_list.h"
#include "base/uuid.h"
#include "chrome/browser/tab_group_sync/tab_group_sync_service_factory.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/layout_constants.h"
#include "chrome/browser/ui/tabs/saved_tab_groups/saved_tab_group_utils.h"
#include "chrome/browser/ui/ui_features.h"
#include "chrome/browser/ui/views/bookmarks/saved_tab_groups/saved_tab_group_button.h"
#include "chrome/browser/ui/views/bookmarks/saved_tab_groups/saved_tab_group_overflow_button.h"
#include "chrome/browser/ui/views/frame/test_with_browser_view.h"
#include "chrome/grit/generated_resources.h"
#include "chrome/test/base/test_browser_window.h"
#include "chrome/test/base/testing_profile.h"
#include "chrome/test/views/chrome_views_test_base.h"
#include "components/saved_tab_groups/features.h"
#include "components/saved_tab_groups/saved_tab_group_test_utils.h"
#include "components/saved_tab_groups/tab_group_sync_service.h"
#include "components/saved_tab_groups/types.h"
#include "components/tab_groups/tab_group_id.h"
#include "components/tab_groups/tab_group_visual_data.h"
#include "content/public/test/test_renderer_host.h"
#include "content/public/test/web_contents_tester.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "ui/views/accessibility/view_accessibility.h"
#include "ui/views/view_utils.h"
namespace tab_groups {
namespace {
const std::u16string kNewTitle(u"kNewTitle");
const tab_groups::TabGroupColorId kNewColor = …;
}
class SavedTabGroupBarUnitTest : public TestWithBrowserView,
public ::testing::WithParamInterface<bool> { … };
class STGEverythingMenuUnitTest : public SavedTabGroupBarUnitTest { … };
TEST_P(STGEverythingMenuUnitTest, TabGroupItemsSortedByCreationTime) { … }
TEST_P(SavedTabGroupBarUnitTest, AddsButtonFromModelAdd) { … }
TEST_P(SavedTabGroupBarUnitTest, EverthingButtonAlwaysVisibleForV2) { … }
TEST_P(SavedTabGroupBarUnitTest, OverflowMenuVisibleWhenFifthButtonAdded) { … }
TEST_P(SavedTabGroupBarUnitTest, OverflowMenuHiddenWhenFifthButtonRemoved) { … }
TEST_P(SavedTabGroupBarUnitTest, OverflowMenuHiddenWhenFirstButtonRemoved) { … }
TEST_P(SavedTabGroupBarUnitTest, BarsWithSameModelsHaveSameButtons) { … }
TEST_P(SavedTabGroupBarUnitTest, RemoveButtonFromModelRemove) { … }
TEST_P(SavedTabGroupBarUnitTest, UpdatedVisualDataMakesChangeToSpecificView) { … }
TEST_P(SavedTabGroupBarUnitTest, MoveButtonFromModelMove) { … }
TEST_P(SavedTabGroupBarUnitTest, CalculatePreferredWidthRestrictedByExactSize) { … }
TEST_P(SavedTabGroupBarUnitTest,
CalculatePreferredWidthRestrictedByLargerSize) { … }
TEST_P(SavedTabGroupBarUnitTest,
CalculatePreferredWidthRestrictedBySmallerSize) { … }
TEST_P(SavedTabGroupBarUnitTest, AddPinnedTabGroupButton) { … }
TEST_P(SavedTabGroupBarUnitTest, PinTabGroupAddButton) { … }
TEST_P(SavedTabGroupBarUnitTest, UnpinTabGroupRemoveButton) { … }
TEST_P(SavedTabGroupBarUnitTest, PinAndUnpinMultipleTabGroups) { … }
TEST_P(SavedTabGroupBarUnitTest, OnlyShowEverthingButtonForV2) { … }
TEST_P(SavedTabGroupBarUnitTest, AccessibleProperties) { … }
INSTANTIATE_TEST_SUITE_P(…);
INSTANTIATE_TEST_SUITE_P(…);
}