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

Unified Diff: ui/message_center/cocoa/popup_collection_unittest.mm

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/cocoa/popup_collection.h ('k') | ui/message_center/cocoa/popup_controller_unittest.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/message_center/cocoa/popup_collection_unittest.mm
diff --git a/ui/message_center/cocoa/popup_collection_unittest.mm b/ui/message_center/cocoa/popup_collection_unittest.mm
index f80288831896ea81dbf4dff8d3b4dafa7eb0cb65..de85e2c284e3a3293c6cadc0cf9ec30a42eedc82 100644
--- a/ui/message_center/cocoa/popup_collection_unittest.mm
+++ b/ui/message_center/cocoa/popup_collection_unittest.mm
@@ -4,10 +4,10 @@
#import "ui/message_center/cocoa/popup_collection.h"
+#include <memory>
#include <utility>
#include "base/mac/scoped_nsobject.h"
-#include "base/memory/scoped_ptr.h"
#include "base/message_loop/message_loop.h"
#include "base/run_loop.h"
#include "base/strings/sys_string_conversions.h"
@@ -49,7 +49,7 @@ class PopupCollectionTest : public ui::CocoaTest {
}
void AddThreeNotifications() {
- scoped_ptr<message_center::Notification> notification;
+ std::unique_ptr<message_center::Notification> notification;
notification.reset(new message_center::Notification(
message_center::NOTIFICATION_TYPE_SIMPLE, "1", ASCIIToUTF16("One"),
ASCIIToUTF16("This is the first notification to"
@@ -96,7 +96,7 @@ class PopupCollectionTest : public ui::CocoaTest {
}
base::MessageLoopForUI message_loop_;
- scoped_ptr<base::RunLoop> nested_run_loop_;
+ std::unique_ptr<base::RunLoop> nested_run_loop_;
message_center::MessageCenter* center_;
base::scoped_nsobject<MCPopupCollection> collection_;
};
@@ -118,7 +118,7 @@ TEST_F(PopupCollectionTest, AttemptFourOneOffscreen) {
AddThreeNotifications();
EXPECT_EQ(2u, [[collection_ popups] count]); // "3" does not fit on screen.
- scoped_ptr<message_center::Notification> notification;
+ std::unique_ptr<message_center::Notification> notification;
notification.reset(new message_center::Notification(
message_center::NOTIFICATION_TYPE_SIMPLE, "4", ASCIIToUTF16("Four"),
@@ -163,7 +163,7 @@ TEST_F(PopupCollectionTest, LayoutSpacing) {
// Set priority so that kMaxVisiblePopupNotifications does not hide it.
message_center::RichNotificationData optional;
optional.priority = message_center::HIGH_PRIORITY;
- scoped_ptr<message_center::Notification> notification;
+ std::unique_ptr<message_center::Notification> notification;
notification.reset(new message_center::Notification(
message_center::NOTIFICATION_TYPE_SIMPLE, "4", ASCIIToUTF16("Four"),
ASCIIToUTF16("This is the fourth notification."), gfx::Image(),
@@ -194,7 +194,7 @@ TEST_F(PopupCollectionTest, TinyScreen) {
[collection_ setScreenFrame:NSMakeRect(0, 0, 800, 100)];
EXPECT_EQ(0u, [[collection_ popups] count]);
- scoped_ptr<message_center::Notification> notification;
+ std::unique_ptr<message_center::Notification> notification;
notification.reset(new message_center::Notification(
message_center::NOTIFICATION_TYPE_SIMPLE, "1", ASCIIToUTF16("One"),
ASCIIToUTF16("This is the first notification to"
@@ -247,7 +247,7 @@ TEST_F(PopupCollectionTest, UpdateIconAndBody) {
// Replace "1".
controller = [[popups objectAtIndex:0] notificationController];
NSRect old_frame = [[controller view] frame];
- scoped_ptr<message_center::Notification> notification;
+ std::unique_ptr<message_center::Notification> notification;
notification.reset(new message_center::Notification(
message_center::NOTIFICATION_TYPE_SIMPLE, "1",
ASCIIToUTF16("One is going to get a much longer "
@@ -274,7 +274,7 @@ TEST_F(PopupCollectionTest, UpdateIconAndBody) {
}
TEST_F(PopupCollectionTest, UpdatePriority) {
- scoped_ptr<message_center::Notification> notification;
+ std::unique_ptr<message_center::Notification> notification;
notification.reset(new message_center::Notification(
message_center::NOTIFICATION_TYPE_SIMPLE, "1", ASCIIToUTF16("One"),
ASCIIToUTF16("This notification should not yet toast."), gfx::Image(),
@@ -302,7 +302,7 @@ TEST_F(PopupCollectionTest, UpdatePriority) {
TEST_F(PopupCollectionTest, CloseCollectionBeforeNewPopupAnimationEnds) {
// Add a notification and don't wait for the animation to finish.
- scoped_ptr<message_center::Notification> notification;
+ std::unique_ptr<message_center::Notification> notification;
notification.reset(new message_center::Notification(
message_center::NOTIFICATION_TYPE_SIMPLE, "1", ASCIIToUTF16("One"),
ASCIIToUTF16("This is the first notification to"
@@ -331,7 +331,7 @@ TEST_F(PopupCollectionTest, CloseCollectionBeforeUpdatePopupAnimationEnds) {
AddThreeNotifications();
// Update a notification and don't wait for the animation to finish.
- scoped_ptr<message_center::Notification> notification;
+ std::unique_ptr<message_center::Notification> notification;
notification.reset(new message_center::Notification(
message_center::NOTIFICATION_TYPE_SIMPLE, "1", ASCIIToUTF16("One"),
ASCIIToUTF16("New message."), gfx::Image(), base::string16(), GURL(),
« no previous file with comments | « ui/message_center/cocoa/popup_collection.h ('k') | ui/message_center/cocoa/popup_controller_unittest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698