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

Unified Diff: ui/message_center/message_center_tray_unittest.cc

Issue 1868363002: Replace scoped_ptr with std::unique_ptr in //ui (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@scopedptrcc
Patch Set: scopedptrui: rebase-make_scoped_ptr Created 4 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/message_center/message_center_tray.cc ('k') | ui/message_center/notification.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/message_center/message_center_tray_unittest.cc
diff --git a/ui/message_center/message_center_tray_unittest.cc b/ui/message_center/message_center_tray_unittest.cc
index 5d443108cc7c1fa51921f6638037016350b4c400..6c4212d81ccaa40e45ce111b2517bd51d51a297c 100644
--- a/ui/message_center/message_center_tray_unittest.cc
+++ b/ui/message_center/message_center_tray_unittest.cc
@@ -80,7 +80,7 @@ class MessageCenterTrayTest : public testing::Test {
}
void AddNotification(const std::string& id, NotifierId notifier_id) {
- scoped_ptr<Notification> notification(new Notification(
+ std::unique_ptr<Notification> notification(new Notification(
message_center::NOTIFICATION_TYPE_SIMPLE, id,
ASCIIToUTF16("Test Web Notification"),
ASCIIToUTF16("Notification message body."), gfx::Image(),
@@ -88,8 +88,8 @@ class MessageCenterTrayTest : public testing::Test {
message_center::RichNotificationData(), NULL /* delegate */));
message_center_->AddNotification(std::move(notification));
}
- scoped_ptr<MockDelegate> delegate_;
- scoped_ptr<MessageCenterTray> message_center_tray_;
+ std::unique_ptr<MockDelegate> delegate_;
+ std::unique_ptr<MessageCenterTray> message_center_tray_;
MessageCenter* message_center_;
private:
@@ -221,7 +221,7 @@ TEST_F(MessageCenterTrayTest, MessageCenterReopenPopupsForSystemPriority) {
ASSERT_FALSE(message_center_tray_->popups_visible());
ASSERT_FALSE(message_center_tray_->message_center_visible());
- scoped_ptr<Notification> notification(new Notification(
+ std::unique_ptr<Notification> notification(new Notification(
message_center::NOTIFICATION_TYPE_SIMPLE,
"MessageCenterReopnPopupsForSystemPriority",
ASCIIToUTF16("Test Web Notification"),
@@ -294,7 +294,7 @@ TEST_F(MessageCenterTrayTest, ContextMenuTestWithMessageCenter) {
NotifierId notifier_id = DummyNotifierId();
NotifierId notifier_id2(NotifierId::APPLICATION, "sample-app");
- scoped_ptr<Notification> notification(new Notification(
+ std::unique_ptr<Notification> notification(new Notification(
message_center::NOTIFICATION_TYPE_SIMPLE, id2,
ASCIIToUTF16("Test Web Notification"),
ASCIIToUTF16("Notification message body."), gfx::Image(),
@@ -304,9 +304,9 @@ TEST_F(MessageCenterTrayTest, ContextMenuTestWithMessageCenter) {
AddNotification(id3);
- scoped_ptr<ui::MenuModel> model(
- message_center_tray_->CreateNotificationMenuModel(
- notifier_id, display_source));
+ std::unique_ptr<ui::MenuModel> model(
+ message_center_tray_->CreateNotificationMenuModel(notifier_id,
+ display_source));
EXPECT_EQ(2, model->GetItemCount());
const int second_command = model->GetCommandIdAt(1);
@@ -352,7 +352,7 @@ TEST_F(MessageCenterTrayTest, ContextMenuTestPopupsOnly) {
AddNotification(id1, notifier_id);
NotifierId notifier_id2(NotifierId::APPLICATION, "sample-app");
- scoped_ptr<Notification> notification(new Notification(
+ std::unique_ptr<Notification> notification(new Notification(
message_center::NOTIFICATION_TYPE_SIMPLE, id2,
ASCIIToUTF16("Test Web Notification"),
ASCIIToUTF16("Notification message body."), gfx::Image(),
@@ -363,7 +363,7 @@ TEST_F(MessageCenterTrayTest, ContextMenuTestPopupsOnly) {
AddNotification(id3, notifier_id);
// The dummy notifier is SYSTEM_COMPONENT so no context menu is visible.
- scoped_ptr<ui::MenuModel> model(
+ std::unique_ptr<ui::MenuModel> model(
message_center_tray_->CreateNotificationMenuModel(DummyNotifierId(),
display_source));
EXPECT_EQ(nullptr, model.get());
@@ -401,7 +401,7 @@ TEST_F(MessageCenterTrayTest, DelegateDisabledContextMenu) {
delegate_->enable_context_menu_ = false;
// id2 doesn't have the display source, so it don't have the menu item for
// disabling notifications.
- scoped_ptr<ui::MenuModel> model(
+ std::unique_ptr<ui::MenuModel> model(
message_center_tray_->CreateNotificationMenuModel(notifier_id,
display_source));
« no previous file with comments | « ui/message_center/message_center_tray.cc ('k') | ui/message_center/notification.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698