#include "build/build_config.h"
#include "chrome/browser/sync/test/integration/fake_server_match_status_checker.h"
#include "chrome/browser/sync/test/integration/sync_test.h"
#include "chrome/browser/sync/test/integration/themes_helper.h"
#include "chrome/browser/themes/theme_syncable_service.h"
#include "components/sync/engine/loopback_server/persistent_unique_client_entity.h"
#include "components/sync/test/fake_server.h"
#include "content/public/test/browser_test.h"
#include "testing/gmock/include/gmock/gmock.h"
namespace {
GetCustomTheme;
IsSystemThemeDistinctFromDefaultTheme;
UseCustomTheme;
UseDefaultTheme;
UseSystemTheme;
UsingCustomTheme;
UsingDefaultTheme;
UsingSystemTheme;
MATCHER(HasDefaultTheme, "") { … }
MATCHER(HasSystemTheme, "") { … }
MATCHER_P(HasCustomThemeWithId, theme_id, "") { … }
std::unique_ptr<syncer::LoopbackServerEntity> CreateDefaultThemeEntity() { … }
std::unique_ptr<syncer::LoopbackServerEntity> CreateSystemThemeEntity() { … }
std::unique_ptr<syncer::LoopbackServerEntity> CreateCustomThemeEntity(
const std::string& theme_id) { … }
class ServerThemeMatchChecker
: public fake_server::FakeServerMatchStatusChecker { … };
ServerThemeMatchChecker::ServerThemeMatchChecker(const Matcher& matcher)
: … { … }
ServerThemeMatchChecker::~ServerThemeMatchChecker() = default;
void ServerThemeMatchChecker::OnCommit(
syncer::DataTypeSet committed_data_types) { … }
bool ServerThemeMatchChecker::IsExitConditionSatisfied(std::ostream* os) { … }
class SingleClientThemesSyncTest : public SyncTest { … };
IN_PROC_BROWSER_TEST_F(SingleClientThemesSyncTest, UploadsThemesOnInstall) { … }
IN_PROC_BROWSER_TEST_F(SingleClientThemesSyncTest, UploadsPreexistingTheme) { … }
IN_PROC_BROWSER_TEST_F(SingleClientThemesSyncTest, DownloadsCustomTheme) { … }
IN_PROC_BROWSER_TEST_F(SingleClientThemesSyncTest, DownloadsSystemTheme) { … }
IN_PROC_BROWSER_TEST_F(SingleClientThemesSyncTest, DownloadsDefaultTheme) { … }
}