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

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: Created 6 years, 3 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 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698