#include "chrome/browser/ui/webui/data_sharing_internals/data_sharing_internals_page_handler_impl.h"
#include <set>
#include "base/run_loop.h"
#include "base/test/task_environment.h"
#include "base/types/expected.h"
#include "chrome/browser/data_sharing/data_sharing_service_factory.h"
#include "chrome/browser/profiles/profile.h"
#include "components/data_sharing/public/data_sharing_network_loader.h"
#include "components/data_sharing/public/data_sharing_service.h"
#include "components/data_sharing/public/group_data.h"
#include "components/data_sharing/test_support/mock_data_sharing_service.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
Return;
namespace {
const char kGroup1Id[] = …;
const char kGroup1Name[] = …;
const char kMemberName[] = …;
const char kAccessToken[] = …;
const data_sharing::MemberRole kMemberRole = …;
data_sharing::GroupData GetTestGroupData() { … }
std::set<data_sharing::GroupData> GetTestGroupDataSet() { … }
class MockPage : public data_sharing_internals::mojom::Page { … };
}
class DataSharingInternalsPageHandlerImplTest : public testing::Test { … };
TEST_F(DataSharingInternalsPageHandlerImplTest, UseEmptyService) { … }
TEST_F(DataSharingInternalsPageHandlerImplTest, UseNonEmptyService) { … }
TEST_F(DataSharingInternalsPageHandlerImplTest, GetAllGroupsWithError) { … }
TEST_F(DataSharingInternalsPageHandlerImplTest, GetAllGroups) { … }