#include "base/ranges/algorithm.h"
#include "base/uuid.h"
#include "chrome/browser/sync/test/integration/saved_tab_groups_helper.h"
#include "chrome/browser/sync/test/integration/sync_service_impl_harness.h"
#include "chrome/browser/sync/test/integration/sync_test.h"
#include "chrome/browser/ui/tabs/saved_tab_groups/saved_tab_group_keyed_service.h"
#include "chrome/browser/ui/tabs/saved_tab_groups/saved_tab_group_service_factory.h"
#include "components/saved_tab_groups/features.h"
#include "components/saved_tab_groups/saved_tab_group.h"
#include "components/saved_tab_groups/saved_tab_group_model.h"
#include "components/saved_tab_groups/saved_tab_group_sync_bridge.h"
#include "components/saved_tab_groups/saved_tab_group_tab.h"
#include "components/sync/base/data_type.h"
#include "components/sync/base/features.h"
#include "components/sync/protocol/saved_tab_group_specifics.pb.h"
#include "components/sync/protocol/sync.pb.h"
#include "components/sync/protocol/sync_entity.pb.h"
#include "components/sync/test/fake_server.h"
#include "content/public/test/browser_test.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace tab_groups {
namespace {
sync_pb::SavedTabGroupSpecifics CreateSavedTabGroupSpecific(base::Uuid guid,
bool ui_v2,
int position) { … }
class SingleClientSavedTabGroupsSyncTest
: public SyncTest,
public ::testing::WithParamInterface<bool> { … };
IN_PROC_BROWSER_TEST_P(SingleClientSavedTabGroupsSyncTest,
DownloadsGroupAndTabs) { … }
IN_PROC_BROWSER_TEST_P(SingleClientSavedTabGroupsSyncTest,
DownloadsGroupWithNoTabs) { … }
IN_PROC_BROWSER_TEST_P(SingleClientSavedTabGroupsSyncTest,
DownloadsTabWithNoGroup) { … }
IN_PROC_BROWSER_TEST_P(SingleClientSavedTabGroupsSyncTest, AddToExistingGroup) { … }
IN_PROC_BROWSER_TEST_P(SingleClientSavedTabGroupsSyncTest, RemoveTabFromGroup) { … }
IN_PROC_BROWSER_TEST_P(SingleClientSavedTabGroupsSyncTest, RemoveGroup) { … }
IN_PROC_BROWSER_TEST_P(SingleClientSavedTabGroupsSyncTest,
UpdateGroupMetadata) { … }
IN_PROC_BROWSER_TEST_P(SingleClientSavedTabGroupsSyncTest, UpdatedTabData) { … }
IN_PROC_BROWSER_TEST_P(SingleClientSavedTabGroupsSyncTest, ReorderGroups) { … }
IN_PROC_BROWSER_TEST_P(SingleClientSavedTabGroupsSyncTest, ReorderTabs) { … }
IN_PROC_BROWSER_TEST_P(SingleClientSavedTabGroupsSyncTest,
V1BrowserWithV2Proto) { … }
IN_PROC_BROWSER_TEST_P(SingleClientSavedTabGroupsSyncTest,
V2BrowserWithV1Proto) { … }
INSTANTIATE_TEST_SUITE_P(…);
#if !BUILDFLAG(IS_CHROMEOS_ASH)
class SingleClientSavedTabGroupsSyncTestWithTransportMode
: public SingleClientSavedTabGroupsSyncTest { … };
IN_PROC_BROWSER_TEST_P(SingleClientSavedTabGroupsSyncTestWithTransportMode,
DownloadsGroupAndTabsInTransportMode) { … }
INSTANTIATE_TEST_SUITE_P(…);
#endif
}
}