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 <map> | 5 #include <map> |
6 #include <string> | 6 #include <string> |
7 | 7 |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/message_loop/message_loop.h" | 9 #include "base/message_loop/message_loop.h" |
10 #include "base/strings/string_number_conversions.h" | 10 #include "base/strings/string_number_conversions.h" |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
102 }; | 102 }; |
103 | 103 |
104 Notification CreateTestNotification(const std::string& id, | 104 Notification CreateTestNotification(const std::string& id, |
105 TestDelegate** delegate = NULL) { | 105 TestDelegate** delegate = NULL) { |
106 TestDelegate* new_delegate = new TestDelegate(id); | 106 TestDelegate* new_delegate = new TestDelegate(id); |
107 if (delegate) { | 107 if (delegate) { |
108 *delegate = new_delegate; | 108 *delegate = new_delegate; |
109 new_delegate->AddRef(); | 109 new_delegate->AddRef(); |
110 } | 110 } |
111 | 111 |
112 return Notification(GURL("chrome-test://testing/"), | 112 GURL origin("chrome-test://testing/"); |
113 GURL(), | 113 return Notification(origin, |
114 base::ASCIIToUTF16("title"), | 114 base::ASCIIToUTF16("title"), |
115 base::ASCIIToUTF16("message"), | 115 base::ASCIIToUTF16("message"), |
116 blink::WebTextDirectionDefault, | 116 gfx::Image(), |
117 base::UTF8ToUTF16("chrome-test://testing/"), | 117 base::UTF8ToUTF16("chrome-test://testing/"), |
118 base::UTF8ToUTF16("REPLACE-ME"), | 118 base::UTF8ToUTF16("REPLACE-ME"), |
119 new_delegate); | 119 new_delegate); |
120 } | 120 } |
121 | 121 |
122 Notification CreateRichTestNotification(const std::string& id, | 122 Notification CreateRichTestNotification(const std::string& id, |
123 TestDelegate** delegate = NULL) { | 123 TestDelegate** delegate = NULL) { |
124 TestDelegate* new_delegate = new TestDelegate(id); | 124 TestDelegate* new_delegate = new TestDelegate(id); |
125 if (delegate) { | 125 if (delegate) { |
126 *delegate = new_delegate; | 126 *delegate = new_delegate; |
(...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
362 // Cast so that Observe() is public. | 362 // Cast so that Observe() is public. |
363 content::NotificationObserver* observer = | 363 content::NotificationObserver* observer = |
364 static_cast<content::NotificationObserver*>(manager()); | 364 static_cast<content::NotificationObserver*>(manager()); |
365 observer->Observe(chrome::NOTIFICATION_FULLSCREEN_CHANGED, | 365 observer->Observe(chrome::NOTIFICATION_FULLSCREEN_CHANGED, |
366 content::Source<Profile>(profile()), | 366 content::Source<Profile>(profile()), |
367 content::Details<bool>(&is_fullscreen)); | 367 content::Details<bool>(&is_fullscreen)); |
368 EXPECT_FALSE(message_center()->HasPopupNotifications()); | 368 EXPECT_FALSE(message_center()->HasPopupNotifications()); |
369 } | 369 } |
370 | 370 |
371 #endif // !defined(OS_MACOSX) | 371 #endif // !defined(OS_MACOSX) |
OLD | NEW |