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

Side by Side Diff: sync/test/fake_server/fake_server.h

Issue 1232003003: [Sync] Add bookmark move tests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@bookmark-folders
Patch Set: Self-review. Created 5 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 #ifndef SYNC_TEST_FAKE_SERVER_FAKE_SERVER_H_ 5 #ifndef SYNC_TEST_FAKE_SERVER_FAKE_SERVER_H_
6 #define SYNC_TEST_FAKE_SERVER_FAKE_SERVER_H_ 6 #define SYNC_TEST_FAKE_SERVER_FAKE_SERVER_H_
7 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 // |updated_specifics| does not match the entity, false is returned. 75 // |updated_specifics| does not match the entity, false is returned.
76 // Otherwise, true is returned to represent a successful modification. 76 // Otherwise, true is returned to represent a successful modification.
77 // 77 //
78 // TODO(pvalenzuela): This method should support updating entity data beyond 78 // TODO(pvalenzuela): This method should support updating entity data beyond
79 // EntitySpecifics. For example, in the case of a bookmark, changing the 79 // EntitySpecifics. For example, in the case of a bookmark, changing the
80 // BookmarkSpecifics title field currently does not modify the top-level 80 // BookmarkSpecifics title field currently does not modify the top-level
81 // entity's name field. 81 // entity's name field.
82 bool ModifyEntitySpecifics(const std::string& id, 82 bool ModifyEntitySpecifics(const std::string& id,
83 const sync_pb::EntitySpecifics& updated_specifics); 83 const sync_pb::EntitySpecifics& updated_specifics);
84 84
85 bool ModifyBookmarkEntity(const std::string& id,
86 const std::string& parent_id,
87 const sync_pb::EntitySpecifics& updated_specifics);
88
85 // Clears server data simulating a "dashboard stop and clear" and sets a new 89 // Clears server data simulating a "dashboard stop and clear" and sets a new
86 // store birthday. 90 // store birthday.
87 void ClearServerData(); 91 void ClearServerData();
88 92
89 // Puts the server in a state where it acts as if authentication has 93 // Puts the server in a state where it acts as if authentication has
90 // succeeded. 94 // succeeded.
91 void SetAuthenticated(); 95 void SetAuthenticated();
92 96
93 // Puts the server in a state where all commands will fail with an 97 // Puts the server in a state where all commands will fail with an
94 // authentication error. 98 // authentication error.
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
245 base::ThreadChecker thread_checker_; 249 base::ThreadChecker thread_checker_;
246 250
247 // Creates WeakPtr versions of the current FakeServer. This must be the last 251 // Creates WeakPtr versions of the current FakeServer. This must be the last
248 // data member! 252 // data member!
249 base::WeakPtrFactory<FakeServer> weak_ptr_factory_; 253 base::WeakPtrFactory<FakeServer> weak_ptr_factory_;
250 }; 254 };
251 255
252 } // namespace fake_server 256 } // namespace fake_server
253 257
254 #endif // SYNC_TEST_FAKE_SERVER_FAKE_SERVER_H_ 258 #endif // SYNC_TEST_FAKE_SERVER_FAKE_SERVER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698