| OLD | NEW |
| 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" |
| (...skipping 26 matching lines...) Expand all Loading... |
| 37 NSArray* types = [NSArray arrayWithObject:NSFilenamesPboardType]; | 37 NSArray* types = [NSArray arrayWithObject:NSFilenamesPboardType]; |
| 38 NSString* available = [pasteboard availableTypeFromArray:types]; | 38 NSString* available = [pasteboard availableTypeFromArray:types]; |
| 39 EXPECT_TRUE(available != nil); | 39 EXPECT_TRUE(available != nil); |
| 40 | 40 |
| 41 // Ensure the path is what we expect. | 41 // Ensure the path is what we expect. |
| 42 NSArray* files = [pasteboard propertyListForType:NSFilenamesPboardType]; | 42 NSArray* files = [pasteboard propertyListForType:NSFilenamesPboardType]; |
| 43 ASSERT_TRUE(files != nil); | 43 ASSERT_TRUE(files != nil); |
| 44 NSString* expectedPath = [files objectAtIndex:0]; | 44 NSString* expectedPath = [files objectAtIndex:0]; |
| 45 NSString* realPath = base::SysWideToNSString(testPath.ToWStringHack()); | 45 NSString* realPath = base::SysWideToNSString(testPath.ToWStringHack()); |
| 46 EXPECT_TRUE([expectedPath isEqualToString:realPath]); | 46 EXPECT_TRUE([expectedPath isEqualToString:realPath]); |
| 47 |
| 48 [pasteboard releaseGlobally]; |
| 47 } | 49 } |
| 48 | 50 |
| 49 } // namespace | 51 } // namespace |
| OLD | NEW |