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

Side by Side Diff: ui/message_center/views/message_list_view_unittest.cc

Issue 2691393002: Fix auto raw pointer deduction on linux (Closed)
Patch Set: update Created 3 years, 10 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 <memory> 6 #include <memory>
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "base/memory/ptr_util.h" 10 #include "base/memory/ptr_util.h"
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 void MessageListViewTest::UpdateNotificationSize( 165 void MessageListViewTest::UpdateNotificationSize(
166 const std::string& notification_id) { 166 const std::string& notification_id) {
167 // For this test, this method should not be invoked. 167 // For this test, this method should not be invoked.
168 NOTREACHED(); 168 NOTREACHED();
169 } 169 }
170 170
171 /* Unit tests *****************************************************************/ 171 /* Unit tests *****************************************************************/
172 172
173 TEST_F(MessageListViewTest, AddNotification) { 173 TEST_F(MessageListViewTest, AddNotification) {
174 // Create a dummy notification. 174 // Create a dummy notification.
175 auto notification_view = CreateNotificationView( 175 auto* notification_view = CreateNotificationView(
176 Notification(NOTIFICATION_TYPE_SIMPLE, std::string(kNotificationId1), 176 Notification(NOTIFICATION_TYPE_SIMPLE, std::string(kNotificationId1),
177 base::UTF8ToUTF16("title"), base::UTF8ToUTF16("message1"), 177 base::UTF8ToUTF16("title"), base::UTF8ToUTF16("message1"),
178 gfx::Image(), base::UTF8ToUTF16("display source"), GURL(), 178 gfx::Image(), base::UTF8ToUTF16("display source"), GURL(),
179 NotifierId(NotifierId::APPLICATION, "extension_id"), 179 NotifierId(NotifierId::APPLICATION, "extension_id"),
180 message_center::RichNotificationData(), nullptr)); 180 message_center::RichNotificationData(), nullptr));
181 181
182 EXPECT_EQ(0, message_list_view()->child_count()); 182 EXPECT_EQ(0, message_list_view()->child_count());
183 EXPECT_FALSE(message_list_view()->Contains(notification_view)); 183 EXPECT_FALSE(message_list_view()->Contains(notification_view));
184 184
185 // Add a notification. 185 // Add a notification.
186 message_list_view()->AddNotificationAt(notification_view, 0); 186 message_list_view()->AddNotificationAt(notification_view, 0);
187 187
188 EXPECT_EQ(1, message_list_view()->child_count()); 188 EXPECT_EQ(1, message_list_view()->child_count());
189 EXPECT_TRUE(message_list_view()->Contains(notification_view)); 189 EXPECT_TRUE(message_list_view()->Contains(notification_view));
190 } 190 }
191 191
192 } // namespace 192 } // namespace
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698