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

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: rebase 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 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
180 void MessageListViewTest::UpdateNotificationSize( 180 void MessageListViewTest::UpdateNotificationSize(
181 const std::string& notification_id) { 181 const std::string& notification_id) {
182 // For this test, this method should not be invoked. 182 // For this test, this method should not be invoked.
183 NOTREACHED(); 183 NOTREACHED();
184 } 184 }
185 185
186 /* Unit tests *****************************************************************/ 186 /* Unit tests *****************************************************************/
187 187
188 TEST_F(MessageListViewTest, AddNotification) { 188 TEST_F(MessageListViewTest, AddNotification) {
189 // Create a dummy notification. 189 // Create a dummy notification.
190 auto notification_view = CreateNotificationView( 190 auto* notification_view = CreateNotificationView(
191 Notification(NOTIFICATION_TYPE_SIMPLE, std::string(kNotificationId1), 191 Notification(NOTIFICATION_TYPE_SIMPLE, std::string(kNotificationId1),
192 base::UTF8ToUTF16("title"), base::UTF8ToUTF16("message1"), 192 base::UTF8ToUTF16("title"), base::UTF8ToUTF16("message1"),
193 gfx::Image(), base::UTF8ToUTF16("display source"), GURL(), 193 gfx::Image(), base::UTF8ToUTF16("display source"), GURL(),
194 NotifierId(NotifierId::APPLICATION, "extension_id"), 194 NotifierId(NotifierId::APPLICATION, "extension_id"),
195 message_center::RichNotificationData(), nullptr)); 195 message_center::RichNotificationData(), nullptr));
196 196
197 EXPECT_EQ(0, message_list_view()->child_count()); 197 EXPECT_EQ(0, message_list_view()->child_count());
198 EXPECT_FALSE(message_list_view()->Contains(notification_view)); 198 EXPECT_FALSE(message_list_view()->Contains(notification_view));
199 199
200 // Add a notification. 200 // Add a notification.
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
369 positions = 369 positions =
370 ComputeRepositionOffsets({5, 3, 3, 3}, {false, false, false, false}, 370 ComputeRepositionOffsets({5, 3, 3, 3}, {false, false, false, false},
371 1 /* target_index */, 2 /* padding */); 371 1 /* target_index */, 2 /* padding */);
372 EXPECT_THAT(positions, 372 EXPECT_THAT(positions,
373 ElementsAre(top, top + 7, top + 7 + 5, top + 7 + 5 + 5)); 373 ElementsAre(top, top + 7, top + 7 + 5, top + 7 + 5 + 5));
374 EXPECT_EQ(20 + insets.height() + 2, fixed_height()); 374 EXPECT_EQ(20 + insets.height() + 2, fixed_height());
375 EXPECT_EQ(5 + top + 2, reposition_top()); 375 EXPECT_EQ(5 + top + 2, reposition_top());
376 } 376 }
377 377
378 } // namespace 378 } // namespace
OLDNEW
« no previous file with comments | « ui/message_center/views/message_list_view.cc ('k') | ui/message_center/views/notification_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698