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 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
100 | 100 |
101 Notification CreateTestNotification(const std::string& delegate_id, | 101 Notification CreateTestNotification(const std::string& delegate_id, |
102 TestDelegate** delegate = NULL) { | 102 TestDelegate** delegate = NULL) { |
103 TestDelegate* new_delegate = new TestDelegate(delegate_id); | 103 TestDelegate* new_delegate = new TestDelegate(delegate_id); |
104 if (delegate) { | 104 if (delegate) { |
105 *delegate = new_delegate; | 105 *delegate = new_delegate; |
106 new_delegate->AddRef(); | 106 new_delegate->AddRef(); |
107 } | 107 } |
108 | 108 |
109 return Notification(GURL("chrome-test://testing/"), | 109 return Notification(GURL("chrome-test://testing/"), |
110 GURL(), | |
111 base::ASCIIToUTF16("title"), | 110 base::ASCIIToUTF16("title"), |
112 base::ASCIIToUTF16("message"), | 111 base::ASCIIToUTF16("message"), |
113 blink::WebTextDirectionDefault, | 112 gfx::Image(), |
114 base::UTF8ToUTF16("chrome-test://testing/"), | 113 base::UTF8ToUTF16("chrome-test://testing/"), |
115 base::UTF8ToUTF16("REPLACE-ME"), | 114 base::UTF8ToUTF16("REPLACE-ME"), |
116 new_delegate); | 115 new_delegate); |
117 } | 116 } |
118 | 117 |
119 Notification CreateRichTestNotification(const std::string& id, | 118 Notification CreateRichTestNotification(const std::string& id, |
120 TestDelegate** delegate = NULL) { | 119 TestDelegate** delegate = NULL) { |
121 TestDelegate* new_delegate = new TestDelegate(id); | 120 TestDelegate* new_delegate = new TestDelegate(id); |
122 if (delegate) { | 121 if (delegate) { |
123 *delegate = new_delegate; | 122 *delegate = new_delegate; |
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
355 manager()->Update(notification, profile()); | 354 manager()->Update(notification, profile()); |
356 | 355 |
357 // Expect that the progress notification update is performed. | 356 // Expect that the progress notification update is performed. |
358 EXPECT_EQ(base::StringPrintf("update-%s", notification_id.c_str()), | 357 EXPECT_EQ(base::StringPrintf("update-%s", notification_id.c_str()), |
359 observer.log(notification_id)); | 358 observer.log(notification_id)); |
360 | 359 |
361 delegate->Release(); | 360 delegate->Release(); |
362 } | 361 } |
363 | 362 |
364 #endif // !defined(OS_MACOSX) | 363 #endif // !defined(OS_MACOSX) |
OLD | NEW |