OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 "ui/message_center/views/message_popup_collection.h" | 5 #include "ui/message_center/views/message_popup_collection.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <algorithm> | 9 #include <algorithm> |
10 #include <list> | 10 #include <list> |
(...skipping 19 matching lines...) Expand all Loading... |
30 #include "ui/message_center/views/toast_contents_view.h" | 30 #include "ui/message_center/views/toast_contents_view.h" |
31 #include "ui/views/test/views_test_base.h" | 31 #include "ui/views/test/views_test_base.h" |
32 #include "ui/views/widget/widget.h" | 32 #include "ui/views/widget/widget.h" |
33 #include "ui/views/widget/widget_delegate.h" | 33 #include "ui/views/widget/widget_delegate.h" |
34 | 34 |
35 namespace { | 35 namespace { |
36 | 36 |
37 std::unique_ptr<message_center::Notification> CreateTestNotification( | 37 std::unique_ptr<message_center::Notification> CreateTestNotification( |
38 std::string id, | 38 std::string id, |
39 std::string text) { | 39 std::string text) { |
40 return base::WrapUnique(new message_center::Notification( | 40 return base::MakeUnique<message_center::Notification>( |
41 message_center::NOTIFICATION_TYPE_BASE_FORMAT, id, | 41 message_center::NOTIFICATION_TYPE_BASE_FORMAT, id, |
42 base::UTF8ToUTF16("test title"), base::ASCIIToUTF16(text), gfx::Image(), | 42 base::UTF8ToUTF16("test title"), base::ASCIIToUTF16(text), gfx::Image(), |
43 base::string16() /* display_source */, GURL(), | 43 base::string16() /* display_source */, GURL(), |
44 message_center::NotifierId(message_center::NotifierId::APPLICATION, id), | 44 message_center::NotifierId(message_center::NotifierId::APPLICATION, id), |
45 message_center::RichNotificationData(), | 45 message_center::RichNotificationData(), |
46 new message_center::NotificationDelegate())); | 46 new message_center::NotificationDelegate()); |
47 } | 47 } |
48 | 48 |
49 // Provides an aura window context for widget creation. | 49 // Provides an aura window context for widget creation. |
50 class TestPopupAlignmentDelegate | 50 class TestPopupAlignmentDelegate |
51 : public message_center::DesktopPopupAlignmentDelegate { | 51 : public message_center::DesktopPopupAlignmentDelegate { |
52 public: | 52 public: |
53 explicit TestPopupAlignmentDelegate(gfx::NativeWindow context) | 53 explicit TestPopupAlignmentDelegate(gfx::NativeWindow context) |
54 : context_(context) {} | 54 : context_(context) {} |
55 ~TestPopupAlignmentDelegate() override {} | 55 ~TestPopupAlignmentDelegate() override {} |
56 | 56 |
(...skipping 685 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
742 << *checked_animation.error_msg(); | 742 << *checked_animation.error_msg(); |
743 } | 743 } |
744 } | 744 } |
745 | 745 |
746 CloseAllToasts(); | 746 CloseAllToasts(); |
747 WaitForTransitionsDone(); | 747 WaitForTransitionsDone(); |
748 } | 748 } |
749 | 749 |
750 } // namespace test | 750 } // namespace test |
751 } // namespace message_center | 751 } // namespace message_center |
OLD | NEW |