#include "components/data_sharing/internal/preview_server_proxy.h"
#include <memory>
#include "base/functional/callback.h"
#include "base/run_loop.h"
#include "base/test/gtest_util.h"
#include "base/test/scoped_feature_list.h"
#include "base/test/task_environment.h"
#include "base/values.h"
#include "components/data_sharing/public/features.h"
#include "components/endpoint_fetcher/endpoint_fetcher.h"
#include "components/endpoint_fetcher/mock_endpoint_fetcher.h"
#include "components/signin/public/identity_manager/identity_test_environment.h"
#include "net/http/http_status_code.h"
#include "services/data_decoder/public/cpp/test_support/in_process_data_decoder.h"
#include "services/network/public/cpp/shared_url_loader_factory.h"
#include "services/network/public/cpp/weak_wrapper_shared_url_loader_factory.h"
#include "services/network/test/test_url_loader_factory.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
_;
namespace data_sharing {
namespace {
const char kTestServerUrl[] = …;
const char kCollaborationId[] = …;
const char kAccessToken[] = …;
const char kExpectedUrl[] = …;
const std::string kTabGroupResponse = …;
const std::string kTabResponse = …;
const std::string kNoEntitySpecificsResponse = …;
class FakePreviewServerProxy : public PreviewServerProxy { … };
class PreviewServerProxyTest : public testing::Test { … };
TEST_F(PreviewServerProxyTest, TestGetSharedDataPreview_TabGroup) { … }
TEST_F(PreviewServerProxyTest, TestGetSharedDataPreview_Tab) { … }
TEST_F(PreviewServerProxyTest,
TestGetSharedDataPreview_ErrorWithoutEntitySpecifics) { … }
TEST_F(PreviewServerProxyTest, TestGetSharedDataPreview_Deleted) { … }
TEST_F(PreviewServerProxyTest, TestGetSharedDataPreview_ServerError) { … }
TEST_F(PreviewServerProxyTest, TestGetSharedDataPreview_WrongJson) { … }
}
}