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 "base/bind.h" | 5 #include "base/bind.h" |
6 #include "base/memory/scoped_ptr.h" | 6 #include "base/memory/scoped_ptr.h" |
7 #include "base/message_loop.h" | 7 #include "base/message_loop.h" |
8 #include "base/string_number_conversions.h" | 8 #include "base/string_number_conversions.h" |
9 #include "chrome/browser/extensions/app_notification.h" | 9 #include "chrome/browser/extensions/app_notification.h" |
10 #include "chrome/browser/extensions/app_notification_manager.h" | 10 #include "chrome/browser/extensions/app_notification_manager.h" |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
82 | 82 |
83 private: | 83 private: |
84 // The recipient of all sync changes. | 84 // The recipient of all sync changes. |
85 syncer::SyncChangeProcessor* recipient_; | 85 syncer::SyncChangeProcessor* recipient_; |
86 | 86 |
87 DISALLOW_COPY_AND_ASSIGN(SyncChangeProcessorDelegate); | 87 DISALLOW_COPY_AND_ASSIGN(SyncChangeProcessorDelegate); |
88 }; | 88 }; |
89 | 89 |
90 } // namespace | 90 } // namespace |
91 | 91 |
| 92 namespace extensions { |
| 93 |
92 class AppNotificationManagerSyncTest : public testing::Test { | 94 class AppNotificationManagerSyncTest : public testing::Test { |
93 public: | 95 public: |
94 AppNotificationManagerSyncTest() | 96 AppNotificationManagerSyncTest() |
95 : ui_thread_(BrowserThread::UI, &ui_loop_), | 97 : ui_thread_(BrowserThread::UI, &ui_loop_), |
96 file_thread_(BrowserThread::FILE), | 98 file_thread_(BrowserThread::FILE), |
97 sync_processor_(new TestChangeProcessor), | 99 sync_processor_(new TestChangeProcessor), |
98 sync_processor_delegate_(new SyncChangeProcessorDelegate( | 100 sync_processor_delegate_(new SyncChangeProcessorDelegate( |
99 sync_processor_.get())) {} | 101 sync_processor_.get())) {} |
100 | 102 |
101 ~AppNotificationManagerSyncTest() { | 103 ~AppNotificationManagerSyncTest() { |
(...skipping 640 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
742 | 744 |
743 EXPECT_EQ(3U, processor()->change_list_size()); | 745 EXPECT_EQ(3U, processor()->change_list_size()); |
744 EXPECT_TRUE(processor()->ContainsGuid(n1->guid())); | 746 EXPECT_TRUE(processor()->ContainsGuid(n1->guid())); |
745 syncer::SyncChange c1 = processor()->GetChangeByGuid(n1->guid()); | 747 syncer::SyncChange c1 = processor()->GetChangeByGuid(n1->guid()); |
746 AssertSyncChange(c1, syncer::SyncChange::ACTION_DELETE, *n1); | 748 AssertSyncChange(c1, syncer::SyncChange::ACTION_DELETE, *n1); |
747 syncer::SyncChange c2 = processor()->GetChangeByGuid(n2->guid()); | 749 syncer::SyncChange c2 = processor()->GetChangeByGuid(n2->guid()); |
748 AssertSyncChange(c2, syncer::SyncChange::ACTION_DELETE, *n2); | 750 AssertSyncChange(c2, syncer::SyncChange::ACTION_DELETE, *n2); |
749 syncer::SyncChange c3 = processor()->GetChangeByGuid(n3->guid()); | 751 syncer::SyncChange c3 = processor()->GetChangeByGuid(n3->guid()); |
750 AssertSyncChange(c3, syncer::SyncChange::ACTION_DELETE, *n3); | 752 AssertSyncChange(c3, syncer::SyncChange::ACTION_DELETE, *n3); |
751 } | 753 } |
| 754 |
| 755 } // namespace extensions |
OLD | NEW |