chromium/chrome/browser/ui/tabs/saved_tab_groups/tab_group_sync_service_proxy_unittest.cc

// Copyright 2024 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "chrome/browser/ui/tabs/saved_tab_groups/tab_group_sync_service_proxy.h"

#include <memory>

#include "base/test/scoped_feature_list.h"
#include "chrome/browser/tab_group_sync/tab_group_sync_service_factory.h"
#include "chrome/browser/ui/tabs/saved_tab_groups/saved_tab_group_service_factory.h"
#include "chrome/browser/ui/tabs/saved_tab_groups/saved_tab_group_utils.h"
#include "chrome/browser/ui/tabs/saved_tab_groups/tab_group_action_context_desktop.h"
#include "chrome/browser/ui/tabs/tab_group_model.h"
#include "chrome/browser/ui/views/frame/test_with_browser_view.h"
#include "components/saved_tab_groups/features.h"
#include "components/saved_tab_groups/tab_group_sync_service.h"
#include "components/saved_tab_groups/types.h"
#include "components/tab_groups/tab_group_color.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/gtest/include/gtest/gtest.h"

namespace tab_groups {
class TabGroupSyncServiceProxyUnitTest
    : public TestWithBrowserView,
      public ::testing::WithParamInterface<bool> {};

// Verify we can add a group to both services correctly.
TEST_P(TabGroupSyncServiceProxyUnitTest, AddGroup) {}

// Verify we can remove a group from the services using the local id correctly.
TEST_P(TabGroupSyncServiceProxyUnitTest, RemoveGroupUsingLocalId) {}

// Verify we can remove a group from the services using the sync id correctly.
TEST_P(TabGroupSyncServiceProxyUnitTest, RemoveGroupUsingSyncId) {}

// Verify we can update a groups visual data  from the services correctly.
TEST_P(TabGroupSyncServiceProxyUnitTest, UpdateVisualData) {}

TEST_P(TabGroupSyncServiceProxyUnitTest, UpdateGroupPositionPinnedState) {}

TEST_P(TabGroupSyncServiceProxyUnitTest, UpdateGroupPositionIndex) {}

// Verifies that we add tabs to a group at the correct position.
TEST_P(TabGroupSyncServiceProxyUnitTest, AddTab) {}

// Verifies that we can update the title and url of a tab in a  saved group.
TEST_P(TabGroupSyncServiceProxyUnitTest, UpdateTab) {}

// Verifies that we can remove a tab in a group and that after removing all of
// the tabs, the group is deleted.
TEST_P(TabGroupSyncServiceProxyUnitTest, RemoveTab) {}

// Verifies that we can move the tabs in a saved group correctly.
TEST_P(TabGroupSyncServiceProxyUnitTest, MoveTab) {}

// Verifies that we can update the local tab group mapping of a saved group
// after it is added to the service.
TEST_P(TabGroupSyncServiceProxyUnitTest, UpdateLocalTabGroupMapping) {}

// Verifies that we can remove the local tab group mapping of a saved group
// after it is added to the service.
TEST_P(TabGroupSyncServiceProxyUnitTest, RemoveLocalTabGroupMapping) {}

// Verifies that we can update the local tab id mapping for a tab in a saved
// group after it is added to the service.
TEST_P(TabGroupSyncServiceProxyUnitTest, UpdateLocalTabId) {}

// Verifies that when a new tab group is created in the browser it is saved by
// default. When it is closed, the group should still be saved but no longer
// have a local id.
TEST_P(TabGroupSyncServiceProxyUnitTest, DefaultSaveNewGroups) {}

// Verifies that opening a saved group in the same window properly opens it and
// associates the local id with the saved id.
TEST_P(TabGroupSyncServiceProxyUnitTest, OpenTabGroupInSameWindow) {}

// Verifies that opening a saved group in a different window properly opens it
// and associates the local id with the saved id.
TEST_P(TabGroupSyncServiceProxyUnitTest, OpenTabGroupInDifferentWindow) {}

// Verifies that opening a saved group that is already open will focus the
// first tab in the group instead of opening a new one.
TEST_P(TabGroupSyncServiceProxyUnitTest,
       OpenTabGroupFocusFirstTabIfOpenedAlready) {}

INSTANTIATE_TEST_SUITE_P();

}  // namespace tab_groups