| OLD | NEW |
| 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 // Download utility test for Mac OS X. | 5 // Download utility test for Mac OS X. |
| 6 | 6 |
| 7 #include "base/files/file_path.h" | 7 #include "base/files/file_path.h" |
| 8 #include "base/memory/ref_counted.h" | 8 #include "base/memory/ref_counted.h" |
| 9 #include "base/path_service.h" | 9 #include "base/path_service.h" |
| 10 #include "base/strings/sys_string_conversions.h" | 10 #include "base/strings/sys_string_conversions.h" |
| 11 #import "chrome/browser/ui/cocoa/cocoa_test_helper.h" | |
| 12 #import "chrome/browser/ui/cocoa/download/download_util_mac.h" | 11 #import "chrome/browser/ui/cocoa/download/download_util_mac.h" |
| 12 #import "chrome/browser/ui/cocoa/test/cocoa_test_helper.h" |
| 13 #include "chrome/common/chrome_paths.h" | 13 #include "chrome/common/chrome_paths.h" |
| 14 #include "testing/gtest/include/gtest/gtest.h" | 14 #include "testing/gtest/include/gtest/gtest.h" |
| 15 #import "testing/gtest_mac.h" | 15 #import "testing/gtest_mac.h" |
| 16 #include "testing/platform_test.h" | 16 #include "testing/platform_test.h" |
| 17 #import "ui/base/clipboard/clipboard_util_mac.h" | 17 #import "ui/base/clipboard/clipboard_util_mac.h" |
| 18 | 18 |
| 19 namespace { | 19 namespace { |
| 20 | 20 |
| 21 class DownloadUtilMacTest : public CocoaTest { | 21 class DownloadUtilMacTest : public CocoaTest { |
| 22 public: | 22 public: |
| (...skipping 23 matching lines...) Expand all Loading... |
| 46 | 46 |
| 47 // Ensure the path is what we expect. | 47 // Ensure the path is what we expect. |
| 48 NSArray* files = [pasteboard() propertyListForType:NSFilenamesPboardType]; | 48 NSArray* files = [pasteboard() propertyListForType:NSFilenamesPboardType]; |
| 49 ASSERT_TRUE(files != nil); | 49 ASSERT_TRUE(files != nil); |
| 50 NSString* expectedPath = [files objectAtIndex:0]; | 50 NSString* expectedPath = [files objectAtIndex:0]; |
| 51 NSString* realPath = base::SysUTF8ToNSString(testPath.value()); | 51 NSString* realPath = base::SysUTF8ToNSString(testPath.value()); |
| 52 EXPECT_NSEQ(expectedPath, realPath); | 52 EXPECT_NSEQ(expectedPath, realPath); |
| 53 } | 53 } |
| 54 | 54 |
| 55 } // namespace | 55 } // namespace |
| OLD | NEW |