OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "chrome/browser/sync/profile_sync_service.h" | 5 #include "chrome/browser/sync/profile_sync_service.h" |
6 #include "chrome/browser/sync/profile_sync_service_harness.h" | 6 #include "chrome/browser/sync/profile_sync_service_harness.h" |
7 #include "chrome/browser/sync/protocol/sync_protocol_error.h" | 7 #include "chrome/browser/sync/protocol/sync_protocol_error.h" |
8 #include "chrome/browser/sync/test/integration/bookmarks_helper.h" | 8 #include "chrome/browser/sync/test/integration/bookmarks_helper.h" |
9 #include "chrome/browser/sync/test/integration/passwords_helper.h" | 9 #include "chrome/browser/sync/test/integration/passwords_helper.h" |
10 #include "chrome/browser/sync/test/integration/sync_test.h" | 10 #include "chrome/browser/sync/test/integration/sync_test.h" |
11 #include "chrome/common/net/gaia/google_service_auth_error.h" | 11 #include "chrome/common/net/gaia/google_service_auth_error.h" |
12 | 12 |
13 using bookmarks_helper::AddFolder; | 13 using bookmarks_helper::AddFolder; |
14 using bookmarks_helper::SetTitle; | 14 using bookmarks_helper::SetTitle; |
15 using passwords_helper::AddLogin; | 15 using passwords_helper::AddLogin; |
16 using passwords_helper::CreateTestPasswordForm; | 16 using passwords_helper::CreateTestPasswordForm; |
17 using passwords_helper::GetPasswordCount; | 17 using passwords_helper::GetPasswordCount; |
18 using passwords_helper::GetPasswordStore; | 18 using passwords_helper::GetPasswordStore; |
19 using passwords_helper::GetVerifierPasswordCount; | 19 using passwords_helper::GetVerifierPasswordCount; |
20 using passwords_helper::GetVerifierPasswordStore; | 20 using passwords_helper::GetVerifierPasswordStore; |
21 using passwords_helper::ProfileContainsSamePasswordFormsAsVerifier; | 21 using passwords_helper::ProfileContainsSamePasswordFormsAsVerifier; |
22 | 22 |
23 using webkit_glue::PasswordForm; | 23 using webkit::forms::PasswordForm; |
24 | 24 |
25 class SyncErrorTest : public SyncTest{ | 25 class SyncErrorTest : public SyncTest{ |
26 public: | 26 public: |
27 SyncErrorTest() : SyncTest(SINGLE_CLIENT) {} | 27 SyncErrorTest() : SyncTest(SINGLE_CLIENT) {} |
28 virtual ~SyncErrorTest() {} | 28 virtual ~SyncErrorTest() {} |
29 | 29 |
30 private: | 30 private: |
31 DISALLOW_COPY_AND_ASSIGN(SyncErrorTest); | 31 DISALLOW_COPY_AND_ASSIGN(SyncErrorTest); |
32 }; | 32 }; |
33 | 33 |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
131 | 131 |
132 TriggerAuthError(); | 132 TriggerAuthError(); |
133 PasswordForm form1 = CreateTestPasswordForm(1); | 133 PasswordForm form1 = CreateTestPasswordForm(1); |
134 AddLogin(GetPasswordStore(0), form1); | 134 AddLogin(GetPasswordStore(0), form1); |
135 ASSERT_FALSE(GetClient(0)->AwaitFullSyncCompletion("Must get auth error.")); | 135 ASSERT_FALSE(GetClient(0)->AwaitFullSyncCompletion("Must get auth error.")); |
136 ASSERT_EQ(GoogleServiceAuthError::INVALID_GAIA_CREDENTIALS, | 136 ASSERT_EQ(GoogleServiceAuthError::INVALID_GAIA_CREDENTIALS, |
137 GetClient(0)->service()->GetAuthError().state()); | 137 GetClient(0)->service()->GetAuthError().state()); |
138 ASSERT_EQ(ProfileSyncService::Status::OFFLINE_UNSYNCED, | 138 ASSERT_EQ(ProfileSyncService::Status::OFFLINE_UNSYNCED, |
139 GetClient(0)->GetStatus().summary); | 139 GetClient(0)->GetStatus().summary); |
140 } | 140 } |
OLD | NEW |