Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1538)

Side by Side Diff: chrome/browser/sync/test/integration/two_client_preferences_sync_test.cc

Issue 2030013003: Remove ListValue::Append(new {Fundamental,String}Value(...)) pattern in //chrome (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <string> 5 #include <string>
6 6
7 #include "base/guid.h" 7 #include "base/guid.h"
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "base/strings/stringprintf.h" 9 #include "base/strings/stringprintf.h"
10 #include "chrome/browser/sync/test/integration/preferences_helper.h" 10 #include "chrome/browser/sync/test/integration/preferences_helper.h"
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 IN_PROC_BROWSER_TEST_F(TwoClientPreferencesSyncTest, 102 IN_PROC_BROWSER_TEST_F(TwoClientPreferencesSyncTest,
103 E2E_ENABLED(ComplexPrefs)) { 103 E2E_ENABLED(ComplexPrefs)) {
104 ASSERT_TRUE(SetupSync()); 104 ASSERT_TRUE(SetupSync());
105 ASSERT_TRUE(AwaitIntegerPrefMatches(prefs::kRestoreOnStartup)); 105 ASSERT_TRUE(AwaitIntegerPrefMatches(prefs::kRestoreOnStartup));
106 ASSERT_TRUE(AwaitListPrefMatches(prefs::kURLsToRestoreOnStartup)); 106 ASSERT_TRUE(AwaitListPrefMatches(prefs::kURLsToRestoreOnStartup));
107 107
108 ChangeIntegerPref(0, prefs::kRestoreOnStartup, 0); 108 ChangeIntegerPref(0, prefs::kRestoreOnStartup, 0);
109 ASSERT_TRUE(AwaitIntegerPrefMatches(prefs::kRestoreOnStartup)); 109 ASSERT_TRUE(AwaitIntegerPrefMatches(prefs::kRestoreOnStartup));
110 110
111 base::ListValue urls; 111 base::ListValue urls;
112 urls.Append(new base::StringValue("http://www.google.com/")); 112 urls.AppendString("http://www.google.com/");
113 urls.Append(new base::StringValue("http://www.flickr.com/")); 113 urls.AppendString("http://www.flickr.com/");
114 ChangeIntegerPref(0, prefs::kRestoreOnStartup, 4); 114 ChangeIntegerPref(0, prefs::kRestoreOnStartup, 4);
115 ChangeListPref(0, prefs::kURLsToRestoreOnStartup, urls); 115 ChangeListPref(0, prefs::kURLsToRestoreOnStartup, urls);
116 ASSERT_TRUE(AwaitIntegerPrefMatches(prefs::kRestoreOnStartup)); 116 ASSERT_TRUE(AwaitIntegerPrefMatches(prefs::kRestoreOnStartup));
117 ASSERT_TRUE(AwaitListPrefMatches(prefs::kURLsToRestoreOnStartup)); 117 ASSERT_TRUE(AwaitListPrefMatches(prefs::kURLsToRestoreOnStartup));
118 } 118 }
119 119
120 IN_PROC_BROWSER_TEST_F(TwoClientPreferencesSyncTest, 120 IN_PROC_BROWSER_TEST_F(TwoClientPreferencesSyncTest,
121 E2E_ENABLED(SingleClientEnabledEncryptionBothChanged)) { 121 E2E_ENABLED(SingleClientEnabledEncryptionBothChanged)) {
122 ASSERT_TRUE(SetupSync()); 122 ASSERT_TRUE(SetupSync());
123 ASSERT_TRUE(AwaitBooleanPrefMatches(prefs::kHomePageIsNewTabPage)); 123 ASSERT_TRUE(AwaitBooleanPrefMatches(prefs::kHomePageIsNewTabPage));
(...skipping 15 matching lines...) Expand all
139 139
140 ChangeBooleanPref(0, prefs::kHomePageIsNewTabPage); 140 ChangeBooleanPref(0, prefs::kHomePageIsNewTabPage);
141 ASSERT_TRUE(EnableEncryption(0)); 141 ASSERT_TRUE(EnableEncryption(0));
142 ASSERT_TRUE(EnableEncryption(1)); 142 ASSERT_TRUE(EnableEncryption(1));
143 ASSERT_TRUE(AwaitBooleanPrefMatches(prefs::kHomePageIsNewTabPage)); 143 ASSERT_TRUE(AwaitBooleanPrefMatches(prefs::kHomePageIsNewTabPage));
144 144
145 ASSERT_TRUE(AwaitBooleanPrefMatches(prefs::kShowHomeButton)); 145 ASSERT_TRUE(AwaitBooleanPrefMatches(prefs::kShowHomeButton));
146 ChangeBooleanPref(0, prefs::kShowHomeButton); 146 ChangeBooleanPref(0, prefs::kShowHomeButton);
147 ASSERT_TRUE(AwaitBooleanPrefMatches(prefs::kShowHomeButton)); 147 ASSERT_TRUE(AwaitBooleanPrefMatches(prefs::kShowHomeButton));
148 } 148 }
OLDNEW
« no previous file with comments | « chrome/browser/speech/extension_api/tts_extension_api.cc ('k') | chrome/browser/tracing/chrome_tracing_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698