Index: trunk/src/chrome/browser/extensions/api/image_writer_private/write_from_url_operation_unittest.cc |
=================================================================== |
--- trunk/src/chrome/browser/extensions/api/image_writer_private/write_from_url_operation_unittest.cc (revision 282139) |
+++ trunk/src/chrome/browser/extensions/api/image_writer_private/write_from_url_operation_unittest.cc (working copy) |
@@ -77,8 +77,7 @@ |
// Turn on interception and set up our dummy file. |
net::URLFetcher::SetEnableInterceptionForTests(true); |
get_interceptor_.reset(new GetInterceptor()); |
- get_interceptor_->SetResponse(GURL(kTestImageUrl), |
- test_utils_.GetImagePath()); |
+ get_interceptor_->SetResponse(GURL(kTestImageUrl), test_image_path_); |
} |
virtual void TearDown() OVERRIDE { |
@@ -96,7 +95,7 @@ |
test_profile_.GetRequestContext(), |
url, |
hash, |
- test_utils_.GetDevicePath().AsUTF8Unsafe())); |
+ test_device_path_.AsUTF8Unsafe())); |
operation->Start(); |
return operation; |
} |
@@ -141,8 +140,8 @@ |
scoped_refptr<OperationForTest> operation = |
CreateOperation(GURL(kTestImageUrl), ""); |
- EXPECT_TRUE(base::CreateTemporaryFileInDir(test_utils_.GetTempDir(), |
- &download_target_path)); |
+ EXPECT_TRUE( |
+ base::CreateTemporaryFileInDir(temp_dir_.path(), &download_target_path)); |
operation->SetImagePath(download_target_path); |
EXPECT_CALL( |
@@ -165,8 +164,7 @@ |
runloop.Run(); |
- EXPECT_TRUE(base::ContentsEqual(test_utils_.GetImagePath(), |
- operation->GetImagePath())); |
+ EXPECT_TRUE(base::ContentsEqual(test_image_path_, operation->GetImagePath())); |
EXPECT_EQ(1, get_interceptor_->GetHitCount()); |
@@ -175,7 +173,7 @@ |
TEST_F(ImageWriterWriteFromUrlOperationTest, VerifyFile) { |
scoped_ptr<char[]> data_buffer(new char[kTestFileSize]); |
- base::ReadFile(test_utils_.GetImagePath(), data_buffer.get(), kTestFileSize); |
+ base::ReadFile(test_image_path_, data_buffer.get(), kTestFileSize); |
base::MD5Digest expected_digest; |
base::MD5Sum(data_buffer.get(), kTestFileSize, &expected_digest); |
std::string expected_hash = base::MD5DigestToBase16(expected_digest); |
@@ -196,7 +194,7 @@ |
image_writer_api::STAGE_VERIFYDOWNLOAD, |
100)).Times(AtLeast(1)); |
- operation->SetImagePath(test_utils_.GetImagePath()); |
+ operation->SetImagePath(test_image_path_); |
content::BrowserThread::PostTask(content::BrowserThread::FILE, |
FROM_HERE, |
base::Bind(&OperationForTest::VerifyDownload, |