| 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/files/file.h" | 8 #include "base/files/file.h" |
| 9 #include "base/files/file_util.h" | 9 #include "base/files/file_util.h" |
| 10 #include "base/files/scoped_temp_dir.h" | 10 #include "base/files/scoped_temp_dir.h" |
| (...skipping 527 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 538 [camera_ addMediaFile:picture1]; | 538 [camera_ addMediaFile:picture1]; |
| 539 delegate_->ItemAdded(kTestFileName, info); | 539 delegate_->ItemAdded(kTestFileName, info); |
| 540 delegate_->NoMoreItems(); | 540 delegate_->NoMoreItems(); |
| 541 | 541 |
| 542 EXPECT_EQ(base::File::FILE_OK, ReadDir(base::FilePath(kDevicePath))); | 542 EXPECT_EQ(base::File::FILE_OK, ReadDir(base::FilePath(kDevicePath))); |
| 543 ASSERT_EQ(1U, file_list_.size()); | 543 ASSERT_EQ(1U, file_list_.size()); |
| 544 ASSERT_EQ("filename", file_list_[0].name); | 544 ASSERT_EQ("filename", file_list_[0].name); |
| 545 | 545 |
| 546 EXPECT_EQ(base::File::FILE_ERROR_NOT_FOUND, | 546 EXPECT_EQ(base::File::FILE_ERROR_NOT_FOUND, |
| 547 DownloadFile(base::FilePath("/ic:id/nonexist"), | 547 DownloadFile(base::FilePath("/ic:id/nonexist"), |
| 548 temp_dir_.path().Append("target"))); | 548 temp_dir_.GetPath().Append("target"))); |
| 549 | 549 |
| 550 EXPECT_EQ(base::File::FILE_OK, | 550 EXPECT_EQ(base::File::FILE_OK, |
| 551 DownloadFile(base::FilePath("/ic:id/filename"), | 551 DownloadFile(base::FilePath("/ic:id/filename"), |
| 552 temp_dir_.path().Append("target"))); | 552 temp_dir_.GetPath().Append("target"))); |
| 553 std::string contents; | 553 std::string contents; |
| 554 EXPECT_TRUE(base::ReadFileToString(temp_dir_.path().Append("target"), | 554 EXPECT_TRUE( |
| 555 &contents)); | 555 base::ReadFileToString(temp_dir_.GetPath().Append("target"), &contents)); |
| 556 EXPECT_EQ(kTestFileContents, contents); | 556 EXPECT_EQ(kTestFileContents, contents); |
| 557 } | 557 } |
| OLD | NEW |