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

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: Use a couple existing JNI methods instead. 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
« no previous file with comments | « sync/test/fake_server/bookmark_entity.cc ('k') | sync/test/fake_server/fake_server.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 // updated. If the given |id| does not exist or the ModelType of 74 // updated. If the given |id| does not exist or the ModelType of
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 // This method sometimes updates entity data beyond EntitySpecifics. For 78 // This method sometimes updates entity data beyond EntitySpecifics. For
79 // example, in the case of a bookmark, changing the BookmarkSpecifics title 79 // example, in the case of a bookmark, changing the BookmarkSpecifics title
80 // field will modify the top-level entity's name field. 80 // field will modify the top-level entity's name field.
81 bool ModifyEntitySpecifics(const std::string& id, 81 bool ModifyEntitySpecifics(const std::string& id,
82 const sync_pb::EntitySpecifics& updated_specifics); 82 const sync_pb::EntitySpecifics& updated_specifics);
83 83
84 bool ModifyBookmarkEntity(const std::string& id,
85 const std::string& parent_id,
86 const sync_pb::EntitySpecifics& updated_specifics);
87
84 // Clears server data simulating a "dashboard stop and clear" and sets a new 88 // Clears server data simulating a "dashboard stop and clear" and sets a new
85 // store birthday. 89 // store birthday.
86 void ClearServerData(); 90 void ClearServerData();
87 91
88 // Puts the server in a state where it acts as if authentication has 92 // Puts the server in a state where it acts as if authentication has
89 // succeeded. 93 // succeeded.
90 void SetAuthenticated(); 94 void SetAuthenticated();
91 95
92 // Puts the server in a state where all commands will fail with an 96 // Puts the server in a state where all commands will fail with an
93 // authentication error. 97 // authentication error.
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
244 base::ThreadChecker thread_checker_; 248 base::ThreadChecker thread_checker_;
245 249
246 // Creates WeakPtr versions of the current FakeServer. This must be the last 250 // Creates WeakPtr versions of the current FakeServer. This must be the last
247 // data member! 251 // data member!
248 base::WeakPtrFactory<FakeServer> weak_ptr_factory_; 252 base::WeakPtrFactory<FakeServer> weak_ptr_factory_;
249 }; 253 };
250 254
251 } // namespace fake_server 255 } // namespace fake_server
252 256
253 #endif // SYNC_TEST_FAKE_SERVER_FAKE_SERVER_H_ 257 #endif // SYNC_TEST_FAKE_SERVER_FAKE_SERVER_H_
OLDNEW
« no previous file with comments | « sync/test/fake_server/bookmark_entity.cc ('k') | sync/test/fake_server/fake_server.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698