OLD | NEW |
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 "chrome/browser/sync/sessions/sync_session.h" | 5 #include "chrome/browser/sync/sessions/sync_session.h" |
6 | 6 |
7 #include "base/compiler_specific.h" | 7 #include "base/compiler_specific.h" |
8 #include "base/location.h" | 8 #include "base/location.h" |
9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
10 #include "base/message_loop.h" | 10 #include "base/message_loop.h" |
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
151 session->mutable_status_controller()-> | 151 session->mutable_status_controller()-> |
152 GetUnrestrictedMutableConflictProgressForTest(GROUP_PASSIVE); | 152 GetUnrestrictedMutableConflictProgressForTest(GROUP_PASSIVE); |
153 EXPECT_TRUE(session->GetEnabledGroupsWithConflicts().empty()); | 153 EXPECT_TRUE(session->GetEnabledGroupsWithConflicts().empty()); |
154 } | 154 } |
155 | 155 |
156 TEST_F(SyncSessionTest, EnabledGroupsWithConflicts) { | 156 TEST_F(SyncSessionTest, EnabledGroupsWithConflicts) { |
157 scoped_ptr<SyncSession> session(MakeSession()); | 157 scoped_ptr<SyncSession> session(MakeSession()); |
158 // Put GROUP_UI in conflict. | 158 // Put GROUP_UI in conflict. |
159 session->mutable_status_controller()-> | 159 session->mutable_status_controller()-> |
160 GetUnrestrictedMutableConflictProgressForTest(GROUP_UI)-> | 160 GetUnrestrictedMutableConflictProgressForTest(GROUP_UI)-> |
161 AddConflictingItemById(syncable::Id()); | 161 AddSimpleConflictingItemById(syncable::Id()); |
162 std::set<ModelSafeGroup> expected_enabled_groups_with_conflicts; | 162 std::set<ModelSafeGroup> expected_enabled_groups_with_conflicts; |
163 expected_enabled_groups_with_conflicts.insert(GROUP_UI); | 163 expected_enabled_groups_with_conflicts.insert(GROUP_UI); |
164 EXPECT_EQ(expected_enabled_groups_with_conflicts, | 164 EXPECT_EQ(expected_enabled_groups_with_conflicts, |
165 session->GetEnabledGroupsWithConflicts()); | 165 session->GetEnabledGroupsWithConflicts()); |
166 } | 166 } |
167 | 167 |
168 TEST_F(SyncSessionTest, ScopedContextHelpers) { | 168 TEST_F(SyncSessionTest, ScopedContextHelpers) { |
169 ConflictResolver resolver; | 169 ConflictResolver resolver; |
170 EXPECT_FALSE(context_->resolver()); | 170 EXPECT_FALSE(context_->resolver()); |
171 { | 171 { |
(...skipping 412 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
584 EXPECT_EQ(empty_payload, original[syncable::BOOKMARKS]); | 584 EXPECT_EQ(empty_payload, original[syncable::BOOKMARKS]); |
585 EXPECT_EQ(payload1, original[syncable::PASSWORDS]); | 585 EXPECT_EQ(payload1, original[syncable::PASSWORDS]); |
586 EXPECT_EQ(payload1, original[syncable::AUTOFILL]); | 586 EXPECT_EQ(payload1, original[syncable::AUTOFILL]); |
587 EXPECT_EQ(payload2, original[syncable::SESSIONS]); | 587 EXPECT_EQ(payload2, original[syncable::SESSIONS]); |
588 EXPECT_EQ(payload3, original[syncable::THEMES]); | 588 EXPECT_EQ(payload3, original[syncable::THEMES]); |
589 } | 589 } |
590 | 590 |
591 } // namespace | 591 } // namespace |
592 } // namespace sessions | 592 } // namespace sessions |
593 } // namespace browser_sync | 593 } // namespace browser_sync |
OLD | NEW |