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 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
99 | 99 |
100 Notification CreateTestNotification(const std::string& id, | 100 Notification CreateTestNotification(const std::string& id, |
101 TestDelegate** delegate = NULL) { | 101 TestDelegate** delegate = NULL) { |
102 TestDelegate* new_delegate = new TestDelegate(id); | 102 TestDelegate* new_delegate = new TestDelegate(id); |
103 if (delegate) { | 103 if (delegate) { |
104 *delegate = new_delegate; | 104 *delegate = new_delegate; |
105 new_delegate->AddRef(); | 105 new_delegate->AddRef(); |
106 } | 106 } |
107 | 107 |
108 return Notification(GURL("chrome-test://testing/"), | 108 return Notification(GURL("chrome-test://testing/"), |
109 GURL(), | |
110 base::ASCIIToUTF16("title"), | 109 base::ASCIIToUTF16("title"), |
111 base::ASCIIToUTF16("message"), | 110 base::ASCIIToUTF16("message"), |
112 blink::WebTextDirectionDefault, | 111 gfx::Image(), |
113 base::UTF8ToUTF16("chrome-test://testing/"), | 112 base::UTF8ToUTF16("chrome-test://testing/"), |
114 base::UTF8ToUTF16("REPLACE-ME"), | 113 base::UTF8ToUTF16("REPLACE-ME"), |
115 new_delegate); | 114 new_delegate); |
116 } | 115 } |
117 | 116 |
118 Notification CreateRichTestNotification(const std::string& id, | 117 Notification CreateRichTestNotification(const std::string& id, |
119 TestDelegate** delegate = NULL) { | 118 TestDelegate** delegate = NULL) { |
120 TestDelegate* new_delegate = new TestDelegate(id); | 119 TestDelegate* new_delegate = new TestDelegate(id); |
121 if (delegate) { | 120 if (delegate) { |
122 *delegate = new_delegate; | 121 *delegate = new_delegate; |
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
335 notification.set_progress(50); | 334 notification.set_progress(50); |
336 manager()->Update(notification, profile()); | 335 manager()->Update(notification, profile()); |
337 | 336 |
338 // Expect that the progress notification update is performed. | 337 // Expect that the progress notification update is performed. |
339 EXPECT_EQ("update-n", observer.log("n")); | 338 EXPECT_EQ("update-n", observer.log("n")); |
340 | 339 |
341 delegate->Release(); | 340 delegate->Release(); |
342 } | 341 } |
343 | 342 |
344 #endif // !defined(OS_MACOSX) | 343 #endif // !defined(OS_MACOSX) |
OLD | NEW |