Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(473)

Side by Side Diff: chrome/browser/notifications/message_center_notifications_browsertest.cc

Issue 554213003: Request the icon of a Web Notification in the renderer process. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix the tests Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698