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

Side by Side Diff: chrome/browser/ui/cocoa/screen_capture_notification_ui_cocoa_unittest.mm

Issue 1865213004: Convert //chrome/browser/ui from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase 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 unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 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 #import "chrome/browser/ui/cocoa/screen_capture_notification_ui_cocoa.h" 5 #import "chrome/browser/ui/cocoa/screen_capture_notification_ui_cocoa.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "base/strings/utf_string_conversions.h" 9 #include "base/strings/utf_string_conversions.h"
10 #include "chrome/browser/ui/cocoa/cocoa_test_helper.h" 10 #include "chrome/browser/ui/cocoa/cocoa_test_helper.h"
(...skipping 29 matching lines...) Expand all
40 40
41 void StopCallback() { 41 void StopCallback() {
42 ++callback_called_; 42 ++callback_called_;
43 } 43 }
44 44
45 protected: 45 protected:
46 ScreenCaptureNotificationController* controller() { 46 ScreenCaptureNotificationController* controller() {
47 return target_->windowController_.get(); 47 return target_->windowController_.get();
48 } 48 }
49 49
50 scoped_ptr<ScreenCaptureNotificationUICocoa> target_; 50 std::unique_ptr<ScreenCaptureNotificationUICocoa> target_;
51 int callback_called_; 51 int callback_called_;
52 52
53 DISALLOW_COPY_AND_ASSIGN(ScreenCaptureNotificationUICocoaTest); 53 DISALLOW_COPY_AND_ASSIGN(ScreenCaptureNotificationUICocoaTest);
54 }; 54 };
55 55
56 TEST_F(ScreenCaptureNotificationUICocoaTest, CreateAndDestroy) { 56 TEST_F(ScreenCaptureNotificationUICocoaTest, CreateAndDestroy) {
57 target_.reset( 57 target_.reset(
58 new ScreenCaptureNotificationUICocoa(base::UTF8ToUTF16("Title"))); 58 new ScreenCaptureNotificationUICocoa(base::UTF8ToUTF16("Title")));
59 } 59 }
60 60
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 new ScreenCaptureNotificationUICocoa(base::UTF8ToUTF16("Title"))); 116 new ScreenCaptureNotificationUICocoa(base::UTF8ToUTF16("Title")));
117 target_->OnStarted( 117 target_->OnStarted(
118 base::Bind(&ScreenCaptureNotificationUICocoaTest::StopCallback, 118 base::Bind(&ScreenCaptureNotificationUICocoaTest::StopCallback,
119 base::Unretained(this))); 119 base::Unretained(this)));
120 120
121 [[controller() minimizeButton] performClick:nil]; 121 [[controller() minimizeButton] performClick:nil];
122 122
123 EXPECT_EQ(0, callback_called_); 123 EXPECT_EQ(0, callback_called_);
124 EXPECT_TRUE([[controller() window] isMiniaturized]); 124 EXPECT_TRUE([[controller() window] isMiniaturized]);
125 } 125 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698