| 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" |
| (...skipping 550 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 561 ASSERT_EQ("filename", file_list_[0].name); | 561 ASSERT_EQ("filename", file_list_[0].name); |
| 562 | 562 |
| 563 EXPECT_EQ(base::PLATFORM_FILE_ERROR_NOT_FOUND, | 563 EXPECT_EQ(base::PLATFORM_FILE_ERROR_NOT_FOUND, |
| 564 DownloadFile(base::FilePath("/ic:id/nonexist"), | 564 DownloadFile(base::FilePath("/ic:id/nonexist"), |
| 565 temp_dir_.path().Append("target"))); | 565 temp_dir_.path().Append("target"))); |
| 566 | 566 |
| 567 EXPECT_EQ(base::PLATFORM_FILE_OK, | 567 EXPECT_EQ(base::PLATFORM_FILE_OK, |
| 568 DownloadFile(base::FilePath("/ic:id/filename"), | 568 DownloadFile(base::FilePath("/ic:id/filename"), |
| 569 temp_dir_.path().Append("target"))); | 569 temp_dir_.path().Append("target"))); |
| 570 std::string contents; | 570 std::string contents; |
| 571 EXPECT_TRUE(file_util::ReadFileToString(temp_dir_.path().Append("target"), | 571 EXPECT_TRUE(base::ReadFileToString(temp_dir_.path().Append("target"), |
| 572 &contents)); | 572 &contents)); |
| 573 EXPECT_EQ(kTestFileContents, contents); | 573 EXPECT_EQ(kTestFileContents, contents); |
| 574 } | 574 } |
| OLD | NEW |