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

Side by Side Diff: chrome/browser/ui/cocoa/media_picker/desktop_media_picker_controller_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/media_picker/desktop_media_picker_controller.h" 5 #import "chrome/browser/ui/cocoa/media_picker/desktop_media_picker_controller.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/run_loop.h" 8 #include "base/run_loop.h"
9 #include "base/strings/utf_string_conversions.h" 9 #include "base/strings/utf_string_conversions.h"
10 #include "chrome/browser/media/desktop_media_list_observer.h" 10 #include "chrome/browser/media/desktop_media_list_observer.h"
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 void SetUp() override { 51 void SetUp() override {
52 CocoaTest::SetUp(); 52 CocoaTest::SetUp();
53 53
54 media_list_ = new FakeDesktopMediaList(); 54 media_list_ = new FakeDesktopMediaList();
55 55
56 DesktopMediaPicker::DoneCallback callback = 56 DesktopMediaPicker::DoneCallback callback =
57 base::Bind(&DesktopMediaPickerControllerTest::OnResult, 57 base::Bind(&DesktopMediaPickerControllerTest::OnResult,
58 base::Unretained(this)); 58 base::Unretained(this));
59 59
60 controller_.reset([[DesktopMediaPickerController alloc] 60 controller_.reset([[DesktopMediaPickerController alloc]
61 initWithMediaList:scoped_ptr<DesktopMediaList>(media_list_) 61 initWithMediaList:std::unique_ptr<DesktopMediaList>(media_list_)
62 parent:nil 62 parent:nil
63 callback:callback 63 callback:callback
64 appName:base::ASCIIToUTF16("Screenshare Test") 64 appName:base::ASCIIToUTF16("Screenshare Test")
65 targetName:base::ASCIIToUTF16("https://foo.com") 65 targetName:base::ASCIIToUTF16("https://foo.com")
66 requestAudio:true]); 66 requestAudio:true]);
67 } 67 }
68 68
69 void TearDown() override { 69 void TearDown() override {
70 controller_.reset(); 70 controller_.reset();
71 CocoaTest::TearDown(); 71 CocoaTest::TearDown();
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after
246 index_set = [NSIndexSet indexSetWithIndex:2]; 246 index_set = [NSIndexSet indexSetWithIndex:2];
247 [[controller_ sourceBrowser] setSelectionIndexes:index_set 247 [[controller_ sourceBrowser] setSelectionIndexes:index_set
248 byExtendingSelection:NO]; 248 byExtendingSelection:NO];
249 EXPECT_EQ(YES, [checkbox isEnabled]); 249 EXPECT_EQ(YES, [checkbox isEnabled]);
250 250
251 index_set = [NSIndexSet indexSet]; 251 index_set = [NSIndexSet indexSet];
252 [[controller_ sourceBrowser] setSelectionIndexes:index_set 252 [[controller_ sourceBrowser] setSelectionIndexes:index_set
253 byExtendingSelection:NO]; 253 byExtendingSelection:NO];
254 EXPECT_EQ(NO, [checkbox isEnabled]); 254 EXPECT_EQ(NO, [checkbox isEnabled]);
255 } 255 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698