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 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/gtest_prod_util.h" | 8 #include "base/gtest_prod_util.h" |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "base/prefs/pref_service.h" | 10 #include "base/prefs/pref_service.h" |
11 #include "base/strings/utf_string_conversions.h" | 11 #include "base/strings/utf_string_conversions.h" |
12 #include "base/values.h" | 12 #include "base/values.h" |
13 #include "chrome/browser/notifications/notification.h" | 13 #include "chrome/browser/notifications/notification.h" |
14 #include "chrome/browser/notifications/notification_test_util.h" | 14 #include "chrome/browser/notifications/notification_test_util.h" |
15 #include "chrome/browser/notifications/notification_ui_manager.h" | 15 #include "chrome/browser/notifications/notification_ui_manager.h" |
16 #include "chrome/browser/notifications/sync_notifier/chrome_notifier_service.h" | 16 #include "chrome/browser/notifications/sync_notifier/chrome_notifier_service.h" |
17 #include "chrome/browser/notifications/sync_notifier/sync_notifier_test_utils.h" | 17 #include "chrome/browser/notifications/sync_notifier/sync_notifier_test_utils.h" |
18 #include "chrome/browser/notifications/sync_notifier/synced_notification.h" | 18 #include "chrome/browser/notifications/sync_notifier/synced_notification.h" |
19 #include "chrome/browser/notifications/sync_notifier/synced_notification_app_inf
o.h" | 19 #include "chrome/browser/notifications/sync_notifier/synced_notification_app_inf
o.h" |
20 #include "chrome/browser/notifications/sync_notifier/synced_notification_app_inf
o_service.h" | 20 #include "chrome/browser/notifications/sync_notifier/synced_notification_app_inf
o_service.h" |
21 #include "chrome/browser/notifications/sync_notifier/synced_notification_app_inf
o_service_factory.h" | 21 #include "chrome/browser/notifications/sync_notifier/synced_notification_app_inf
o_service_factory.h" |
22 #include "chrome/browser/prefs/browser_prefs.h" | 22 #include "chrome/browser/prefs/browser_prefs.h" |
23 #include "chrome/browser/profiles/profile.h" | 23 #include "chrome/browser/profiles/profile.h" |
24 #include "chrome/common/chrome_switches.h" | 24 #include "chrome/common/chrome_switches.h" |
25 #include "chrome/common/pref_names.h" | 25 #include "chrome/common/pref_names.h" |
26 #include "chrome/test/base/testing_pref_service_syncable.h" | 26 #include "chrome/test/base/testing_pref_service_syncable.h" |
27 #include "chrome/test/base/testing_profile.h" | 27 #include "chrome/test/base/testing_profile.h" |
28 #include "components/user_prefs/pref_registry_syncable.h" | 28 #include "components/pref_registry/pref_registry_syncable.h" |
29 #include "content/public/test/test_browser_thread_bundle.h" | 29 #include "content/public/test/test_browser_thread_bundle.h" |
30 #include "sync/api/sync_change.h" | 30 #include "sync/api/sync_change.h" |
31 #include "sync/api/sync_change_processor.h" | 31 #include "sync/api/sync_change_processor.h" |
32 #include "sync/api/sync_change_processor_wrapper_for_test.h" | 32 #include "sync/api/sync_change_processor_wrapper_for_test.h" |
33 #include "sync/api/sync_error_factory.h" | 33 #include "sync/api/sync_error_factory.h" |
34 #include "sync/api/sync_error_factory_mock.h" | 34 #include "sync/api/sync_error_factory_mock.h" |
35 #include "testing/gtest/include/gtest/gtest.h" | 35 #include "testing/gtest/include/gtest/gtest.h" |
36 | 36 |
37 using sync_pb::SyncedNotificationSpecifics; | 37 using sync_pb::SyncedNotificationSpecifics; |
38 using sync_pb::EntitySpecifics; | 38 using sync_pb::EntitySpecifics; |
(...skipping 693 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
732 notifier.OnRemovedAppIds(removed_app_ids); | 732 notifier.OnRemovedAppIds(removed_app_ids); |
733 | 733 |
734 // Verify the notification was "removed" in the notification manager. | 734 // Verify the notification was "removed" in the notification manager. |
735 EXPECT_EQ(std::string(kKey1), notification_manager()->dismissed_id()); | 735 EXPECT_EQ(std::string(kKey1), notification_manager()->dismissed_id()); |
736 } | 736 } |
737 | 737 |
738 // TODO(petewil): Add a test that we do *not* get a welcome dialog unless we | 738 // TODO(petewil): Add a test that we do *not* get a welcome dialog unless we |
739 // have a valid app info for the notification. | 739 // have a valid app info for the notification. |
740 | 740 |
741 } // namespace notifier | 741 } // namespace notifier |
OLD | NEW |