| 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 <map> | 5 #include <map> |
| 6 #include <string> | 6 #include <string> |
| 7 | 7 |
| 8 #include "base/bind.h" | 8 #include "base/bind.h" |
| 9 #include "base/bind_helpers.h" | 9 #include "base/bind_helpers.h" |
| 10 #include "base/callback.h" | 10 #include "base/callback.h" |
| (...skipping 664 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 675 | 675 |
| 676 // Test the DataTypeController on delete. | 676 // Test the DataTypeController on delete. |
| 677 TEST_F(ProfileSyncServiceSessionTest, UpdatedSyncNodeActionDelete) { | 677 TEST_F(ProfileSyncServiceSessionTest, UpdatedSyncNodeActionDelete) { |
| 678 CreateRootHelper create_root(this); | 678 CreateRootHelper create_root(this); |
| 679 ASSERT_TRUE(StartSyncService(create_root.callback(), false)); | 679 ASSERT_TRUE(StartSyncService(create_root.callback(), false)); |
| 680 ASSERT_TRUE(create_root.success()); | 680 ASSERT_TRUE(create_root.success()); |
| 681 | 681 |
| 682 int64 node_id = model_associator_->GetSyncIdFromSessionTag( | 682 int64 node_id = model_associator_->GetSyncIdFromSessionTag( |
| 683 model_associator_->GetCurrentMachineTag()); | 683 model_associator_->GetCurrentMachineTag()); |
| 684 sync_pb::EntitySpecifics deleted_specifics; | 684 sync_pb::EntitySpecifics deleted_specifics; |
| 685 deleted_specifics.MutableExtension(sync_pb::session)->set_session_tag("tag"); | 685 deleted_specifics.mutable_session()->set_session_tag("tag"); |
| 686 ASSERT_FALSE(notified_of_update_); | 686 ASSERT_FALSE(notified_of_update_); |
| 687 { | 687 { |
| 688 sync_api::WriteTransaction trans(FROM_HERE, sync_service_->GetUserShare()); | 688 sync_api::WriteTransaction trans(FROM_HERE, sync_service_->GetUserShare()); |
| 689 change_processor_->ApplyChangesFromSyncModel( | 689 change_processor_->ApplyChangesFromSyncModel( |
| 690 &trans, | 690 &trans, |
| 691 ProfileSyncServiceTestHelper::MakeSingletonDeletionChangeRecordList( | 691 ProfileSyncServiceTestHelper::MakeSingletonDeletionChangeRecordList( |
| 692 node_id, deleted_specifics)); | 692 node_id, deleted_specifics)); |
| 693 } | 693 } |
| 694 ASSERT_TRUE(notified_of_update_); | 694 ASSERT_TRUE(notified_of_update_); |
| 695 } | 695 } |
| (...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 999 GetEntryAtIndex(1)->GetVirtualURL()); | 999 GetEntryAtIndex(1)->GetVirtualURL()); |
| 1000 iter++; | 1000 iter++; |
| 1001 ASSERT_EQ(2, iter->second.tab()->GetEntryCount()); | 1001 ASSERT_EQ(2, iter->second.tab()->GetEntryCount()); |
| 1002 ASSERT_EQ(GURL("http://bar1"), iter->second.tab()-> | 1002 ASSERT_EQ(GURL("http://bar1"), iter->second.tab()-> |
| 1003 GetEntryAtIndex(0)->GetVirtualURL()); | 1003 GetEntryAtIndex(0)->GetVirtualURL()); |
| 1004 ASSERT_EQ(GURL("http://bar2"), iter->second.tab()-> | 1004 ASSERT_EQ(GURL("http://bar2"), iter->second.tab()-> |
| 1005 GetEntryAtIndex(1)->GetVirtualURL()); | 1005 GetEntryAtIndex(1)->GetVirtualURL()); |
| 1006 } | 1006 } |
| 1007 | 1007 |
| 1008 } // namespace browser_sync | 1008 } // namespace browser_sync |
| OLD | NEW |