chromium/chrome/browser/sync/test/integration/two_client_power_bookmarks_sync_test.cc

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

#include <vector>

#include "base/scoped_multi_source_observation.h"
#include "base/test/bind.h"
#include "base/test/scoped_feature_list.h"
#include "chrome/browser/power_bookmarks/power_bookmark_service_factory.h"
#include "chrome/browser/sync/test/integration/contact_info_helper.h"
#include "chrome/browser/sync/test/integration/status_change_checker.h"
#include "chrome/browser/sync/test/integration/sync_test.h"
#include "components/power_bookmarks/common/power.h"
#include "components/power_bookmarks/common/power_bookmark_observer.h"
#include "components/power_bookmarks/common/power_test_util.h"
#include "components/power_bookmarks/core/power_bookmark_features.h"
#include "components/power_bookmarks/core/power_bookmark_service.h"
#include "components/sync/base/features.h"
#include "components/sync/test/fake_server_http_post_provider.h"
#include "content/public/test/browser_test.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"

namespace {

ContainerEq;

std::string PowerToString(const power_bookmarks::Power& power) {}

std::vector<std::string> GetPowersForURLAsString(
    GURL url,
    power_bookmarks::PowerBookmarkService* service) {}

// Helper class to wait until the two services match for the given `url`.
class PowerBookmarkChecker : public StatusChangeChecker,
                             public power_bookmarks::PowerBookmarkObserver {};

class TwoClientPowerBookmarksSyncTest : public SyncTest {};

bool CreatePower(std::unique_ptr<power_bookmarks::Power> power,
                 power_bookmarks::PowerBookmarkService* service) {}

bool UpdatePower(std::unique_ptr<power_bookmarks::Power> power,
                 power_bookmarks::PowerBookmarkService* service) {}

bool DeletePower(base::Uuid guid,
                 power_bookmarks::PowerBookmarkService* service) {}

bool DeletePowersForURL(GURL url,
                        power_bookmarks::PowerBookmarkService* service) {}
void VerifyPowersForURL(GURL url,
                        power_bookmarks::PowerBookmarkService* service0,
                        power_bookmarks::PowerBookmarkService* service1) {}

// TODO(crbug.com/40285326): This fails with the field trial testing config.
class TwoClientPowerBookmarksSyncTestNoTestingConfig
    : public TwoClientPowerBookmarksSyncTest {};

IN_PROC_BROWSER_TEST_F(TwoClientPowerBookmarksSyncTestNoTestingConfig,
                       AddOnePower) {}

IN_PROC_BROWSER_TEST_F(TwoClientPowerBookmarksSyncTest,
                       // TODO(crbug.com/40901832): Re-enable this test.
                       DISABLED_UpdateOnePower) {}

IN_PROC_BROWSER_TEST_F(TwoClientPowerBookmarksSyncTest, DeleteOnePower) {}

IN_PROC_BROWSER_TEST_F(TwoClientPowerBookmarksSyncTestNoTestingConfig,
                       AddMultiplePowers) {}

IN_PROC_BROWSER_TEST_F(TwoClientPowerBookmarksSyncTest, DeletePowersForURL) {}

}  // namespace