summaryrefslogtreecommitdiffstats
path: root/chrome/browser/sync/test
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/sync/test')
-rw-r--r--chrome/browser/sync/test/integration/extension_settings_helper.cc22
-rw-r--r--chrome/browser/sync/test/integration/multiple_client_preferences_sync_test.cc4
-rw-r--r--chrome/browser/sync/test/integration/preferences_helper.cc12
-rw-r--r--chrome/browser/sync/test/integration/preferences_helper.h2
-rw-r--r--chrome/browser/sync/test/integration/profile_sync_service_harness.cc2
-rw-r--r--chrome/browser/sync/test/integration/sync_extension_helper.cc13
-rw-r--r--chrome/browser/sync/test/integration/two_client_extension_settings_and_app_settings_sync_test.cc16
-rw-r--r--chrome/browser/sync/test/integration/two_client_preferences_sync_test.cc6
8 files changed, 41 insertions, 36 deletions
diff --git a/chrome/browser/sync/test/integration/extension_settings_helper.cc b/chrome/browser/sync/test/integration/extension_settings_helper.cc
index b51d590..f576aba 100644
--- a/chrome/browser/sync/test/integration/extension_settings_helper.cc
+++ b/chrome/browser/sync/test/integration/extension_settings_helper.cc
@@ -28,7 +28,7 @@ namespace extension_settings_helper {
namespace {
-std::string ToJson(const Value& value) {
+std::string ToJson(const base::Value& value) {
std::string json;
base::JSONWriter::WriteWithOptions(&value,
base::JSONWriter::OPTIONS_PRETTY_PRINT,
@@ -36,7 +36,7 @@ std::string ToJson(const Value& value) {
return json;
}
-void GetAllSettingsOnFileThread(DictionaryValue* out,
+void GetAllSettingsOnFileThread(base::DictionaryValue* out,
base::WaitableEvent* signal,
ValueStore* storage) {
CHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE));
@@ -44,10 +44,10 @@ void GetAllSettingsOnFileThread(DictionaryValue* out,
signal->Signal();
}
-scoped_ptr<DictionaryValue> GetAllSettings(
+scoped_ptr<base::DictionaryValue> GetAllSettings(
Profile* profile, const std::string& id) {
base::WaitableEvent signal(false, false);
- scoped_ptr<DictionaryValue> settings(new DictionaryValue());
+ scoped_ptr<base::DictionaryValue> settings(new base::DictionaryValue());
profile->GetExtensionService()->settings_frontend()->RunWithStorage(
id,
extensions::settings_namespace::SYNC,
@@ -69,8 +69,10 @@ bool AreSettingsSame(Profile* expected_profile, Profile* actual_profile) {
for (extensions::ExtensionSet::const_iterator it = extensions->begin();
it != extensions->end(); ++it) {
const std::string& id = (*it)->id();
- scoped_ptr<DictionaryValue> expected(GetAllSettings(expected_profile, id));
- scoped_ptr<DictionaryValue> actual(GetAllSettings(actual_profile, id));
+ scoped_ptr<base::DictionaryValue> expected(
+ GetAllSettings(expected_profile, id));
+ scoped_ptr<base::DictionaryValue> actual(
+ GetAllSettings(actual_profile, id));
if (!expected->Equals(actual.get())) {
ADD_FAILURE() <<
"Expected " << ToJson(*expected) << " got " << ToJson(*actual);
@@ -81,7 +83,7 @@ bool AreSettingsSame(Profile* expected_profile, Profile* actual_profile) {
}
void SetSettingsOnFileThread(
- const DictionaryValue* settings,
+ const base::DictionaryValue* settings,
base::WaitableEvent* signal,
ValueStore* storage) {
CHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE));
@@ -92,7 +94,9 @@ void SetSettingsOnFileThread(
} // namespace
void SetExtensionSettings(
- Profile* profile, const std::string& id, const DictionaryValue& settings) {
+ Profile* profile,
+ const std::string& id,
+ const base::DictionaryValue& settings) {
base::WaitableEvent signal(false, false);
profile->GetExtensionService()->settings_frontend()->RunWithStorage(
id,
@@ -102,7 +106,7 @@ void SetExtensionSettings(
}
void SetExtensionSettingsForAllProfiles(
- const std::string& id, const DictionaryValue& settings) {
+ const std::string& id, const base::DictionaryValue& settings) {
for (int i = 0; i < test()->num_clients(); ++i)
SetExtensionSettings(test()->GetProfile(i), id, settings);
SetExtensionSettings(test()->verifier(), id, settings);
diff --git a/chrome/browser/sync/test/integration/multiple_client_preferences_sync_test.cc b/chrome/browser/sync/test/integration/multiple_client_preferences_sync_test.cc
index 601a514..735f65d 100644
--- a/chrome/browser/sync/test/integration/multiple_client_preferences_sync_test.cc
+++ b/chrome/browser/sync/test/integration/multiple_client_preferences_sync_test.cc
@@ -25,8 +25,8 @@ IN_PROC_BROWSER_TEST_F(MultipleClientPreferencesSyncTest, Sanity) {
DisableVerifier();
for (int i = 0; i < num_clients(); ++i) {
- ListValue urls;
- urls.Append(Value::CreateStringValue(
+ base::ListValue urls;
+ urls.Append(base::Value::CreateStringValue(
base::StringPrintf("http://www.google.com/%d", i)));
ChangeListPref(i, prefs::kURLsToRestoreOnStartup, urls);
}
diff --git a/chrome/browser/sync/test/integration/preferences_helper.cc b/chrome/browser/sync/test/integration/preferences_helper.cc
index b456eab..283a733 100644
--- a/chrome/browser/sync/test/integration/preferences_helper.cc
+++ b/chrome/browser/sync/test/integration/preferences_helper.cc
@@ -75,11 +75,11 @@ void ChangeFilePathPref(int index,
void ChangeListPref(int index,
const char* pref_name,
- const ListValue& new_value) {
+ const base::ListValue& new_value) {
{
ListPrefUpdate update(GetPrefs(index), pref_name);
- ListValue* list = update.Get();
- for (ListValue::const_iterator it = new_value.begin();
+ base::ListValue* list = update.Get();
+ for (base::ListValue::const_iterator it = new_value.begin();
it != new_value.end();
++it) {
list->Append((*it)->DeepCopy());
@@ -88,8 +88,8 @@ void ChangeListPref(int index,
if (test()->use_verifier()) {
ListPrefUpdate update_verifier(GetVerifierPrefs(), pref_name);
- ListValue* list_verifier = update_verifier.Get();
- for (ListValue::const_iterator it = new_value.begin();
+ base::ListValue* list_verifier = update_verifier.Get();
+ for (base::ListValue::const_iterator it = new_value.begin();
it != new_value.end();
++it) {
list_verifier->Append((*it)->DeepCopy());
@@ -200,7 +200,7 @@ bool FilePathPrefMatches(const char* pref_name) {
}
bool ListPrefMatches(const char* pref_name) {
- const ListValue* reference_value;
+ const base::ListValue* reference_value;
if (test()->use_verifier()) {
reference_value = GetVerifierPrefs()->GetList(pref_name);
} else {
diff --git a/chrome/browser/sync/test/integration/preferences_helper.h b/chrome/browser/sync/test/integration/preferences_helper.h
index ac122e6..da3689e7 100644
--- a/chrome/browser/sync/test/integration/preferences_helper.h
+++ b/chrome/browser/sync/test/integration/preferences_helper.h
@@ -67,7 +67,7 @@ void ChangeFilePathPref(int index,
// |verifier| if DisableVerifier() hasn't been called.
void ChangeListPref(int index,
const char* pref_name,
- const ListValue& new_value);
+ const base::ListValue& new_value);
// Used to verify that the boolean preference with name |pref_name| has the
// same value across all profiles. Also checks |verifier| if DisableVerifier()
diff --git a/chrome/browser/sync/test/integration/profile_sync_service_harness.cc b/chrome/browser/sync/test/integration/profile_sync_service_harness.cc
index b779956..80478db 100644
--- a/chrome/browser/sync/test/integration/profile_sync_service_harness.cc
+++ b/chrome/browser/sync/test/integration/profile_sync_service_harness.cc
@@ -905,7 +905,7 @@ size_t ProfileSyncServiceHarness::GetNumDatatypes() const {
}
std::string ProfileSyncServiceHarness::GetServiceStatus() {
- scoped_ptr<DictionaryValue> value(
+ scoped_ptr<base::DictionaryValue> value(
sync_ui_util::ConstructAboutInformation(service()));
std::string service_status;
base::JSONWriter::WriteWithOptions(value.get(),
diff --git a/chrome/browser/sync/test/integration/sync_extension_helper.cc b/chrome/browser/sync/test/integration/sync_extension_helper.cc
index e9c187c..ec9efb8 100644
--- a/chrome/browser/sync/test/integration/sync_extension_helper.cc
+++ b/chrome/browser/sync/test/integration/sync_extension_helper.cc
@@ -274,7 +274,7 @@ std::string NameToPublicKey(const std::string& name) {
scoped_refptr<Extension> CreateExtension(const base::FilePath& base_dir,
const std::string& name,
Manifest::Type type) {
- DictionaryValue source;
+ base::DictionaryValue source;
source.SetString(extensions::manifest_keys::kName, name);
const std::string& public_key = NameToPublicKey(name);
source.SetString(extensions::manifest_keys::kPublicKey, public_key);
@@ -284,19 +284,20 @@ scoped_refptr<Extension> CreateExtension(const base::FilePath& base_dir,
// Do nothing.
break;
case Manifest::TYPE_THEME:
- source.Set(extensions::manifest_keys::kTheme, new DictionaryValue());
+ source.Set(extensions::manifest_keys::kTheme,
+ new base::DictionaryValue());
break;
case Manifest::TYPE_HOSTED_APP:
case Manifest::TYPE_LEGACY_PACKAGED_APP:
- source.Set(extensions::manifest_keys::kApp, new DictionaryValue());
+ source.Set(extensions::manifest_keys::kApp, new base::DictionaryValue());
source.SetString(extensions::manifest_keys::kLaunchWebURL,
"http://www.example.com");
break;
case Manifest::TYPE_PLATFORM_APP: {
- source.Set(extensions::manifest_keys::kApp, new DictionaryValue());
+ source.Set(extensions::manifest_keys::kApp, new base::DictionaryValue());
source.Set(extensions::manifest_keys::kPlatformAppBackground,
- new DictionaryValue());
- ListValue* scripts = new ListValue();
+ new base::DictionaryValue());
+ base::ListValue* scripts = new base::ListValue();
scripts->AppendString("main.js");
source.Set(extensions::manifest_keys::kPlatformAppBackgroundScripts,
scripts);
diff --git a/chrome/browser/sync/test/integration/two_client_extension_settings_and_app_settings_sync_test.cc b/chrome/browser/sync/test/integration/two_client_extension_settings_and_app_settings_sync_test.cc
index daf4bf7..8de4565 100644
--- a/chrome/browser/sync/test/integration/two_client_extension_settings_and_app_settings_sync_test.cc
+++ b/chrome/browser/sync/test/integration/two_client_extension_settings_and_app_settings_sync_test.cc
@@ -30,26 +30,26 @@ void MutateSomeSettings(
const std::string& extension2) {
{
// Write to extension0 from profile 0 but not profile 1.
- DictionaryValue settings;
+ base::DictionaryValue settings;
settings.SetString("asdf", base::StringPrintf("asdfasdf-%d", seed));
SetExtensionSettings(test()->verifier(), extension0, settings);
SetExtensionSettings(test()->GetProfile(0), extension0, settings);
}
{
// Write the same data to extension1 from both profiles.
- DictionaryValue settings;
+ base::DictionaryValue settings;
settings.SetString("asdf", base::StringPrintf("asdfasdf-%d", seed));
settings.SetString("qwer", base::StringPrintf("qwerqwer-%d", seed));
SetExtensionSettingsForAllProfiles(extension1, settings);
}
{
// Write different data to extension2 from each profile.
- DictionaryValue settings0;
+ base::DictionaryValue settings0;
settings0.SetString("zxcv", base::StringPrintf("zxcvzxcv-%d", seed));
SetExtensionSettings(test()->verifier(), extension2, settings0);
SetExtensionSettings(test()->GetProfile(0), extension2, settings0);
- DictionaryValue settings1;
+ base::DictionaryValue settings1;
settings1.SetString("1324", base::StringPrintf("12341234-%d", seed));
settings1.SetString("5687", base::StringPrintf("56785678-%d", seed));
SetExtensionSettings(test()->verifier(), extension2, settings1);
@@ -79,12 +79,12 @@ testing::AssertionResult StartWithSameSettingsTest(
// Leave extension0 empty.
}
{
- DictionaryValue settings;
+ base::DictionaryValue settings;
settings.SetString("foo", "bar");
SetExtensionSettingsForAllProfiles(extension1, settings);
}
{
- DictionaryValue settings;
+ base::DictionaryValue settings;
settings.SetString("foo", "bar");
settings.SetString("baz", "qux");
SetExtensionSettingsForAllProfiles(extension2, settings);
@@ -129,13 +129,13 @@ testing::AssertionResult StartWithDifferentSettingsTest(
// results, so test (empty, empty).
}
{
- DictionaryValue settings;
+ base::DictionaryValue settings;
settings.SetString("foo", "bar");
SetExtensionSettings(test()->verifier(), extension1, settings);
SetExtensionSettings(test()->GetProfile(0), extension1, settings);
}
{
- DictionaryValue settings;
+ base::DictionaryValue settings;
settings.SetString("foo", "bar");
settings.SetString("baz", "qux");
SetExtensionSettings(test()->verifier(), extension2, settings);
diff --git a/chrome/browser/sync/test/integration/two_client_preferences_sync_test.cc b/chrome/browser/sync/test/integration/two_client_preferences_sync_test.cc
index 85ade0b..1533b8c1 100644
--- a/chrome/browser/sync/test/integration/two_client_preferences_sync_test.cc
+++ b/chrome/browser/sync/test/integration/two_client_preferences_sync_test.cc
@@ -226,9 +226,9 @@ IN_PROC_BROWSER_TEST_F(TwoClientPreferencesSyncTest,
ASSERT_TRUE(GetClient(0)->AwaitMutualSyncCycleCompletion(GetClient(1)));
ASSERT_TRUE(IntegerPrefMatches(prefs::kRestoreOnStartup));
- ListValue urls;
- urls.Append(Value::CreateStringValue("http://www.google.com/"));
- urls.Append(Value::CreateStringValue("http://www.flickr.com/"));
+ base::ListValue urls;
+ urls.Append(base::Value::CreateStringValue("http://www.google.com/"));
+ urls.Append(base::Value::CreateStringValue("http://www.flickr.com/"));
ChangeIntegerPref(0, prefs::kRestoreOnStartup, 4);
ChangeListPref(0, prefs::kURLsToRestoreOnStartup, urls);
ASSERT_TRUE(GetClient(0)->AwaitMutualSyncCycleCompletion(GetClient(1)));