blob: 5cd7c351b9975062e4d8efe9b32e5a3ad1992cc8 [file] [log] [blame]
// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chrome/browser/sync/profile_sync_service.h"
#include "chrome/browser/sync/test/integration/preferences_helper.h"
#include "chrome/browser/sync/test/integration/sync_integration_test_util.h"
#include "chrome/browser/sync/test/integration/sync_test.h"
#include "chrome/common/pref_names.h"
using preferences_helper::BooleanPrefMatches;
using preferences_helper::ChangeBooleanPref;
using sync_integration_test_util::AwaitCommitActivityCompletion;
class SingleClientPreferencesSyncTest : public SyncTest {
public:
SingleClientPreferencesSyncTest() : SyncTest(SINGLE_CLIENT) {}
virtual ~SingleClientPreferencesSyncTest() {}
private:
DISALLOW_COPY_AND_ASSIGN(SingleClientPreferencesSyncTest);
};
IN_PROC_BROWSER_TEST_F(SingleClientPreferencesSyncTest, Sanity) {
ASSERT_TRUE(SetupSync()) << "SetupSync() failed.";
ASSERT_TRUE(BooleanPrefMatches(prefs::kHomePageIsNewTabPage));
ChangeBooleanPref(0, prefs::kHomePageIsNewTabPage);
ASSERT_TRUE(AwaitCommitActivityCompletion(GetSyncService((0))));
ASSERT_TRUE(BooleanPrefMatches(prefs::kHomePageIsNewTabPage));
}