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

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

Issue 12252029: [sync] Re-enable SyncErrorTest.XmppAuthErrorTest (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 10 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "base/prefs/pref_service.h" 5 #include "base/prefs/pref_service.h"
6 #include "base/prefs/public/pref_member.h" 6 #include "base/prefs/public/pref_member.h"
7 #include "chrome/browser/sync/profile_sync_service.h" 7 #include "chrome/browser/sync/profile_sync_service.h"
8 #include "chrome/browser/sync/profile_sync_service_harness.h" 8 #include "chrome/browser/sync/profile_sync_service_harness.h"
9 #include "chrome/browser/sync/test/integration/bookmarks_helper.h" 9 #include "chrome/browser/sync/test/integration/bookmarks_helper.h"
10 #include "chrome/browser/sync/test/integration/passwords_helper.h" 10 #include "chrome/browser/sync/test/integration/passwords_helper.h"
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 153
154 const BookmarkNode* node2 = AddFolder(0, 0, L"title2"); 154 const BookmarkNode* node2 = AddFolder(0, 0, L"title2");
155 SetTitle(0, node2, L"new_title2"); 155 SetTitle(0, node2, L"new_title2");
156 ASSERT_TRUE(GetClient(0)->AwaitExponentialBackoffVerification()); 156 ASSERT_TRUE(GetClient(0)->AwaitExponentialBackoffVerification());
157 ASSERT_EQ(GoogleServiceAuthError::INVALID_GAIA_CREDENTIALS, 157 ASSERT_EQ(GoogleServiceAuthError::INVALID_GAIA_CREDENTIALS,
158 GetClient(0)->service()->GetAuthError().state()); 158 GetClient(0)->service()->GetAuthError().state());
159 } 159 }
160 160
161 // Trigger an XMPP auth error, and make sure sync treats it like any 161 // Trigger an XMPP auth error, and make sure sync treats it like any
162 // other auth error. 162 // other auth error.
163 // This has been flaking a lot recently on Mac. http://crbug.com/165328 163 IN_PROC_BROWSER_TEST_F(SyncErrorTest, XmppAuthErrorTest) {
164 #if defined(OS_MACOSX)
165 #define MAYBE_XmppAuthErrorTest DISABLED_XmppAuthErrorTest
166 #else
167 #define MAYBE_XmppAuthErrorTest XmppAuthErrorTest
168 #endif
169 IN_PROC_BROWSER_TEST_F(SyncErrorTest, MAYBE_XmppAuthErrorTest) {
170 ASSERT_TRUE(SetupClients()) << "SetupClients() failed."; 164 ASSERT_TRUE(SetupClients()) << "SetupClients() failed.";
171 165
172 TriggerXmppAuthError(); 166 TriggerXmppAuthError();
173 167
174 ASSERT_FALSE(GetClient(0)->SetupSync()); 168 ASSERT_FALSE(GetClient(0)->SetupSync());
175 169
176 ASSERT_EQ(GoogleServiceAuthError::INVALID_GAIA_CREDENTIALS, 170 ASSERT_EQ(GoogleServiceAuthError::INVALID_GAIA_CREDENTIALS,
177 GetClient(0)->service()->GetAuthError().state()); 171 GetClient(0)->service()->GetAuthError().state());
178 } 172 }
179 173
180 // TODO(lipalani): Fix the typed_url dtc so this test case can pass. 174 // TODO(lipalani): Fix the typed_url dtc so this test case can pass.
181 IN_PROC_BROWSER_TEST_F(SyncErrorTest, DISABLED_DisableDatatypeWhileRunning) { 175 IN_PROC_BROWSER_TEST_F(SyncErrorTest, DISABLED_DisableDatatypeWhileRunning) {
182 ASSERT_TRUE(SetupSync()) << "SetupSync() failed."; 176 ASSERT_TRUE(SetupSync()) << "SetupSync() failed.";
183 syncer::ModelTypeSet synced_datatypes = 177 syncer::ModelTypeSet synced_datatypes =
184 GetClient(0)->service()->GetPreferredDataTypes(); 178 GetClient(0)->service()->GetPreferredDataTypes();
185 ASSERT_TRUE(synced_datatypes.Has(syncer::TYPED_URLS)); 179 ASSERT_TRUE(synced_datatypes.Has(syncer::TYPED_URLS));
186 GetProfile(0)->GetPrefs()->SetBoolean( 180 GetProfile(0)->GetPrefs()->SetBoolean(
187 prefs::kSavingBrowserHistoryDisabled, true); 181 prefs::kSavingBrowserHistoryDisabled, true);
188 182
189 synced_datatypes = GetClient(0)->service()->GetPreferredDataTypes(); 183 synced_datatypes = GetClient(0)->service()->GetPreferredDataTypes();
190 ASSERT_FALSE(synced_datatypes.Has(syncer::TYPED_URLS)); 184 ASSERT_FALSE(synced_datatypes.Has(syncer::TYPED_URLS));
191 185
192 const BookmarkNode* node1 = AddFolder(0, 0, L"title1"); 186 const BookmarkNode* node1 = AddFolder(0, 0, L"title1");
193 SetTitle(0, node1, L"new_title1"); 187 SetTitle(0, node1, L"new_title1");
194 ASSERT_TRUE(GetClient(0)->AwaitFullSyncCompletion("Sync.")); 188 ASSERT_TRUE(GetClient(0)->AwaitFullSyncCompletion("Sync."));
195 // TODO(lipalani)" Verify initial sync ended for typed url is false. 189 // TODO(lipalani)" Verify initial sync ended for typed url is false.
196 } 190 }
197 191
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698