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

Side by Side Diff: chrome/browser/cocoa/download_util_mac_unittest.mm

Issue 3095004: [Mac] Use the new {EXPECT,ASSERT}_NS{EQ,NE} macros where possible. (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: Fix compile Created 10 years, 4 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 (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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 // Download utility test for Mac OS X. 5 // Download utility test for Mac OS X.
6 6
7 #include "base/path_service.h" 7 #include "base/path_service.h"
8 #include "base/sys_string_conversions.h" 8 #include "base/sys_string_conversions.h"
9 #import "chrome/browser/cocoa/cocoa_test_helper.h" 9 #import "chrome/browser/cocoa/cocoa_test_helper.h"
10 #import "chrome/browser/cocoa/download_util_mac.h" 10 #import "chrome/browser/cocoa/download_util_mac.h"
11 #include "chrome/common/chrome_paths.h" 11 #include "chrome/common/chrome_paths.h"
12 #include "testing/gtest/include/gtest/gtest.h" 12 #include "testing/gtest/include/gtest/gtest.h"
13 #import "testing/gtest_mac.h"
13 #include "testing/platform_test.h" 14 #include "testing/platform_test.h"
14 15
15 namespace { 16 namespace {
16 17
17 class DownloadUtilMacTest : public CocoaTest { 18 class DownloadUtilMacTest : public CocoaTest {
18 public: 19 public:
19 DownloadUtilMacTest() { 20 DownloadUtilMacTest() {
20 pasteboard_ = [NSPasteboard pasteboardWithUniqueName]; 21 pasteboard_ = [NSPasteboard pasteboardWithUniqueName];
21 } 22 }
22 23
(...skipping 21 matching lines...) Expand all
44 // Test to see that the object type for dragging files is available. 45 // Test to see that the object type for dragging files is available.
45 NSArray* types = [NSArray arrayWithObject:NSFilenamesPboardType]; 46 NSArray* types = [NSArray arrayWithObject:NSFilenamesPboardType];
46 NSString* available = [pasteboard() availableTypeFromArray:types]; 47 NSString* available = [pasteboard() availableTypeFromArray:types];
47 EXPECT_TRUE(available != nil); 48 EXPECT_TRUE(available != nil);
48 49
49 // Ensure the path is what we expect. 50 // Ensure the path is what we expect.
50 NSArray* files = [pasteboard() propertyListForType:NSFilenamesPboardType]; 51 NSArray* files = [pasteboard() propertyListForType:NSFilenamesPboardType];
51 ASSERT_TRUE(files != nil); 52 ASSERT_TRUE(files != nil);
52 NSString* expectedPath = [files objectAtIndex:0]; 53 NSString* expectedPath = [files objectAtIndex:0];
53 NSString* realPath = base::SysWideToNSString(testPath.ToWStringHack()); 54 NSString* realPath = base::SysWideToNSString(testPath.ToWStringHack());
54 EXPECT_TRUE([expectedPath isEqualToString:realPath]); 55 EXPECT_NSEQ(expectedPath, realPath);
55 } 56 }
56 57
57 } // namespace 58 } // namespace
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698