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

Side by Side Diff: chrome/browser/ui/cocoa/download/download_item_button_unittest.mm

Issue 17593006: mac: Update clients of scoped_nsobject.h. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: iwyu, scoped_nsprotocol Created 7 years, 6 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "base/memory/scoped_nsobject.h" 5 #include "base/mac/scoped_nsobject.h"
6 #import "chrome/browser/ui/cocoa/cocoa_test_helper.h"
6 #import "chrome/browser/ui/cocoa/download/download_item_button.h" 7 #import "chrome/browser/ui/cocoa/download/download_item_button.h"
7 #import "chrome/browser/ui/cocoa/cocoa_test_helper.h"
8 #include "testing/gtest/include/gtest/gtest.h" 8 #include "testing/gtest/include/gtest/gtest.h"
9 #include "testing/platform_test.h" 9 #include "testing/platform_test.h"
10 10
11 // Make sure nothing leaks. 11 // Make sure nothing leaks.
12 TEST(DownloadItemButtonTest, Create) { 12 TEST(DownloadItemButtonTest, Create) {
13 scoped_nsobject<DownloadItemButton> button; 13 base::scoped_nsobject<DownloadItemButton> button;
14 button.reset([[DownloadItemButton alloc] 14 button.reset([[DownloadItemButton alloc]
15 initWithFrame:NSMakeRect(0,0,500,500)]); 15 initWithFrame:NSMakeRect(0,0,500,500)]);
16 16
17 // Test setter 17 // Test setter
18 base::FilePath path("foo"); 18 base::FilePath path("foo");
19 [button.get() setDownload:path]; 19 [button.get() setDownload:path];
20 EXPECT_EQ(path.value(), [button.get() download].value()); 20 EXPECT_EQ(path.value(), [button.get() download].value());
21 } 21 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698