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