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

Side by Side Diff: sync/engine/resolve_conflicts_command_unittest.cc

Issue 10795018: [Sync] Remove unneeded 'using syncer::' lines and 'syncer::' scopings (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fiix indent Created 8 years, 5 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
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/basictypes.h" 5 #include "base/basictypes.h"
6 #include "base/memory/ref_counted.h" 6 #include "base/memory/ref_counted.h"
7 #include "sync/engine/resolve_conflicts_command.h" 7 #include "sync/engine/resolve_conflicts_command.h"
8 #include "sync/internal_api/public/base/model_type.h" 8 #include "sync/internal_api/public/base/model_type.h"
9 #include "sync/sessions/sync_session.h" 9 #include "sync/sessions/sync_session.h"
10 #include "sync/syncable/syncable_id.h" 10 #include "sync/syncable/syncable_id.h"
11 #include "sync/test/engine/fake_model_worker.h" 11 #include "sync/test/engine/fake_model_worker.h"
12 #include "sync/test/engine/syncer_command_test.h" 12 #include "sync/test/engine/syncer_command_test.h"
13 #include "testing/gtest/include/gtest/gtest.h" 13 #include "testing/gtest/include/gtest/gtest.h"
14 14
15 namespace syncer { 15 namespace syncer {
16 16
17 namespace { 17 namespace {
18 18
19 class ResolveConflictsCommandTest : public SyncerCommandTest { 19 class ResolveConflictsCommandTest : public SyncerCommandTest {
20 protected: 20 protected:
21 ResolveConflictsCommandTest() {} 21 ResolveConflictsCommandTest() {}
22 virtual ~ResolveConflictsCommandTest() {} 22 virtual ~ResolveConflictsCommandTest() {}
23 23
24 virtual void SetUp() { 24 virtual void SetUp() {
25 workers()->push_back( 25 workers()->push_back(
26 make_scoped_refptr(new FakeModelWorker(GROUP_UI))); 26 make_scoped_refptr(new FakeModelWorker(GROUP_UI)));
27 workers()->push_back( 27 workers()->push_back(
28 make_scoped_refptr(new FakeModelWorker(GROUP_PASSWORD))); 28 make_scoped_refptr(new FakeModelWorker(GROUP_PASSWORD)));
29 (*mutable_routing_info())[syncer::BOOKMARKS] = GROUP_UI; 29 (*mutable_routing_info())[BOOKMARKS] = GROUP_UI;
30 (*mutable_routing_info())[syncer::PASSWORDS] = GROUP_PASSWORD; 30 (*mutable_routing_info())[PASSWORDS] = GROUP_PASSWORD;
31 SyncerCommandTest::SetUp(); 31 SyncerCommandTest::SetUp();
32 } 32 }
33 33
34 ResolveConflictsCommand command_; 34 ResolveConflictsCommand command_;
35 35
36 private: 36 private:
37 DISALLOW_COPY_AND_ASSIGN(ResolveConflictsCommandTest); 37 DISALLOW_COPY_AND_ASSIGN(ResolveConflictsCommandTest);
38 }; 38 };
39 39
40 TEST_F(ResolveConflictsCommandTest, GetGroupsToChange) { 40 TEST_F(ResolveConflictsCommandTest, GetGroupsToChange) {
41 ExpectNoGroupsToChange(command_); 41 ExpectNoGroupsToChange(command_);
42 // Put GROUP_PASSWORD in conflict. 42 // Put GROUP_PASSWORD in conflict.
43 session()->mutable_status_controller()-> 43 session()->mutable_status_controller()->
44 GetUnrestrictedMutableConflictProgressForTest(GROUP_PASSWORD)-> 44 GetUnrestrictedMutableConflictProgressForTest(GROUP_PASSWORD)->
45 AddSimpleConflictingItemById(syncable::Id()); 45 AddSimpleConflictingItemById(syncable::Id());
46 ExpectGroupToChange(command_, GROUP_PASSWORD); 46 ExpectGroupToChange(command_, GROUP_PASSWORD);
47 } 47 }
48 48
49 } // namespace 49 } // namespace
50 50
51 } // namespace syncer 51 } // namespace syncer
OLDNEW
« no previous file with comments | « sync/engine/process_updates_command_unittest.cc ('k') | sync/engine/store_timestamps_command.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698