| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 <Foundation/Foundation.h> | 5 #import <Foundation/Foundation.h> |
| 6 #import <ImageCaptureCore/ImageCaptureCore.h> | 6 #import <ImageCaptureCore/ImageCaptureCore.h> |
| 7 | 7 |
| 8 #include "base/file_util.h" | 8 #include "base/file_util.h" |
| 9 #include "base/files/scoped_temp_dir.h" | 9 #include "base/files/scoped_temp_dir.h" |
| 10 #include "base/mac/cocoa_protocols.h" | 10 #include "base/mac/cocoa_protocols.h" |
| 11 #include "base/mac/foundation_util.h" | 11 #include "base/mac/foundation_util.h" |
| 12 #include "base/memory/scoped_nsobject.h" | 12 #include "base/memory/scoped_nsobject.h" |
| 13 #include "base/message_loop.h" | 13 #include "base/message_loop.h" |
| 14 #include "base/run_loop.h" | 14 #include "base/run_loop.h" |
| 15 #include "base/strings/sys_string_conversions.h" |
| 15 #include "base/synchronization/waitable_event.h" | 16 #include "base/synchronization/waitable_event.h" |
| 16 #include "base/strings/sys_string_conversions.h" | |
| 17 #include "base/test/sequenced_worker_pool_owner.h" | 17 #include "base/test/sequenced_worker_pool_owner.h" |
| 18 #include "base/threading/sequenced_worker_pool.h" | 18 #include "base/threading/sequenced_worker_pool.h" |
| 19 #include "chrome/browser/media_galleries/mac/mtp_device_delegate_impl_mac.h" | 19 #include "chrome/browser/media_galleries/mac/mtp_device_delegate_impl_mac.h" |
| 20 #include "chrome/browser/storage_monitor/image_capture_device_manager.h" | 20 #include "chrome/browser/storage_monitor/image_capture_device_manager.h" |
| 21 #include "chrome/browser/storage_monitor/test_storage_monitor.h" | 21 #include "chrome/browser/storage_monitor/test_storage_monitor.h" |
| 22 #include "content/public/browser/browser_thread.h" | 22 #include "content/public/browser/browser_thread.h" |
| 23 #include "content/public/test/test_browser_thread.h" | 23 #include "content/public/test/test_browser_thread.h" |
| 24 #include "testing/gtest/include/gtest/gtest.h" | 24 #include "testing/gtest/include/gtest/gtest.h" |
| 25 #include "webkit/fileapi/file_system_file_util.h" | 25 #include "webkit/browser/fileapi/file_system_file_util.h" |
| 26 | 26 |
| 27 #if !defined(MAC_OS_X_VERSION_10_7) || \ | 27 #if !defined(MAC_OS_X_VERSION_10_7) || \ |
| 28 MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_7 | 28 MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_7 |
| 29 | 29 |
| 30 @interface NSObject (ICCameraDeviceDelegateLionAPI) | 30 @interface NSObject (ICCameraDeviceDelegateLionAPI) |
| 31 - (void)deviceDidBecomeReadyWithCompleteContentCatalog:(ICDevice*)device; | 31 - (void)deviceDidBecomeReadyWithCompleteContentCatalog:(ICDevice*)device; |
| 32 - (void)didDownloadFile:(ICCameraFile*)file | 32 - (void)didDownloadFile:(ICCameraFile*)file |
| 33 error:(NSError*)error | 33 error:(NSError*)error |
| 34 options:(NSDictionary*)options | 34 options:(NSDictionary*)options |
| 35 contextInfo:(void*)contextInfo; | 35 contextInfo:(void*)contextInfo; |
| (...skipping 526 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 562 temp_dir_.path().Append("target"))); | 562 temp_dir_.path().Append("target"))); |
| 563 | 563 |
| 564 EXPECT_EQ(base::PLATFORM_FILE_OK, | 564 EXPECT_EQ(base::PLATFORM_FILE_OK, |
| 565 DownloadFile(base::FilePath("/ic:id/filename"), | 565 DownloadFile(base::FilePath("/ic:id/filename"), |
| 566 temp_dir_.path().Append("target"))); | 566 temp_dir_.path().Append("target"))); |
| 567 std::string contents; | 567 std::string contents; |
| 568 EXPECT_TRUE(file_util::ReadFileToString(temp_dir_.path().Append("target"), | 568 EXPECT_TRUE(file_util::ReadFileToString(temp_dir_.path().Append("target"), |
| 569 &contents)); | 569 &contents)); |
| 570 EXPECT_EQ(kTestFileContents, contents); | 570 EXPECT_EQ(kTestFileContents, contents); |
| 571 } | 571 } |
| OLD | NEW |