chromium/chrome/browser/sync/test/integration/device_info_helper.h

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

#ifndef CHROME_BROWSER_SYNC_TEST_INTEGRATION_DEVICE_INFO_HELPER_H_
#define CHROME_BROWSER_SYNC_TEST_INTEGRATION_DEVICE_INFO_HELPER_H_

#include <ostream>
#include <string>

#include "base/memory/raw_ptr.h"
#include "chrome/browser/sync/test/integration/fake_server_match_status_checker.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"

namespace sync_pb {
class SyncEntity;
}

// A helper class that waits for a certain set of DeviceInfos on the FakeServer.
// The desired state is passed in as a GTest matcher.
class ServerDeviceInfoMatchChecker
    : public fake_server::FakeServerMatchStatusChecker {};

namespace device_info_helper {

MATCHER(HasSharingFields, "") {}

MATCHER_P(HasCacheGuid, expected_cache_guid, "") {}

bool WaitForFullDeviceInfoCommitted(const std::string& cache_guid);

}  // namespace device_info_helper

#endif  // CHROME_BROWSER_SYNC_TEST_INTEGRATION_DEVICE_INFO_HELPER_H_