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

Unified Diff: sync/engine/apply_updates_and_resolve_conflicts_command_unittest.cc

Issue 11863011: Revert 176340 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 7 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: sync/engine/apply_updates_and_resolve_conflicts_command_unittest.cc
===================================================================
--- sync/engine/apply_updates_and_resolve_conflicts_command_unittest.cc (revision 176351)
+++ sync/engine/apply_updates_and_resolve_conflicts_command_unittest.cc (working copy)
@@ -71,10 +71,12 @@
TEST_F(ApplyUpdatesAndResolveConflictsCommandTest, Simple) {
string root_server_id = syncable::GetNullId().GetServerId();
- entry_factory_->CreateUnappliedNewBookmarkItemWithParent(
- "parent", DefaultBookmarkSpecifics(), root_server_id);
- entry_factory_->CreateUnappliedNewBookmarkItemWithParent(
- "child", DefaultBookmarkSpecifics(), "parent");
+ entry_factory_->CreateUnappliedNewItemWithParent("parent",
+ DefaultBookmarkSpecifics(),
+ root_server_id);
+ entry_factory_->CreateUnappliedNewItemWithParent("child",
+ DefaultBookmarkSpecifics(),
+ "parent");
ExpectGroupToChange(apply_updates_command_, GROUP_UI);
apply_updates_command_.ExecuteImpl(session());
@@ -93,15 +95,15 @@
// Set a bunch of updates which are difficult to apply in the order
// they're received due to dependencies on other unseen items.
string root_server_id = syncable::GetNullId().GetServerId();
- entry_factory_->CreateUnappliedNewBookmarkItemWithParent(
+ entry_factory_->CreateUnappliedNewItemWithParent(
"a_child_created_first", DefaultBookmarkSpecifics(), "parent");
- entry_factory_->CreateUnappliedNewBookmarkItemWithParent(
+ entry_factory_->CreateUnappliedNewItemWithParent(
"x_child_created_first", DefaultBookmarkSpecifics(), "parent");
- entry_factory_->CreateUnappliedNewBookmarkItemWithParent(
+ entry_factory_->CreateUnappliedNewItemWithParent(
"parent", DefaultBookmarkSpecifics(), root_server_id);
- entry_factory_->CreateUnappliedNewBookmarkItemWithParent(
+ entry_factory_->CreateUnappliedNewItemWithParent(
"a_child_created_second", DefaultBookmarkSpecifics(), "parent");
- entry_factory_->CreateUnappliedNewBookmarkItemWithParent(
+ entry_factory_->CreateUnappliedNewItemWithParent(
"x_child_created_second", DefaultBookmarkSpecifics(), "parent");
ExpectGroupToChange(apply_updates_command_, GROUP_UI);
@@ -117,7 +119,7 @@
// expect the command to detect that this update can't be applied because it is
// in a CONFLICT state.
TEST_F(ApplyUpdatesAndResolveConflictsCommandTest, SimpleConflict) {
- entry_factory_->CreateUnappliedAndUnsyncedBookmarkItem("item");
+ entry_factory_->CreateUnappliedAndUnsyncedItem("item", BOOKMARKS);
ExpectGroupToChange(apply_updates_command_, GROUP_UI);
apply_updates_command_.ExecuteImpl(session());
@@ -137,8 +139,8 @@
// CONFLICT_HIERARCHY state.
TEST_F(ApplyUpdatesAndResolveConflictsCommandTest, HierarchyAndSimpleConflict) {
// Create a simply-conflicting item. It will start with valid parent ids.
- int64 handle = entry_factory_->CreateUnappliedAndUnsyncedBookmarkItem(
- "orphaned_by_server");
+ int64 handle = entry_factory_->CreateUnappliedAndUnsyncedItem(
+ "orphaned_by_server", BOOKMARKS);
{
// Manually set the SERVER_PARENT_ID to bad value.
// A bad parent indicates a hierarchy conflict.
@@ -240,7 +242,8 @@
// Create a server-deleted directory.
{
// Create it as a child of root node.
- int64 handle = entry_factory_->CreateSyncedItem("parent", BOOKMARKS, true);
+ int64 handle =
+ entry_factory_->CreateSyncedItem("parent", BOOKMARKS, true);
WriteTransaction trans(FROM_HERE, UNITTEST, directory());
MutableEntry entry(&trans, syncable::GET_BY_HANDLE, handle);
« no previous file with comments | « chrome/browser/sync/profile_sync_service_bookmark_unittest.cc ('k') | sync/engine/process_commit_response_command_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698