Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(227)

Unified Diff: components/update_client/component_patcher_unittest.cc

Issue 2321453002: c/browser, c/common, components S-W: Change ScopedTempDir::path() to GetPath() (Closed)
Patch Set: Just rebased Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: components/update_client/component_patcher_unittest.cc
diff --git a/components/update_client/component_patcher_unittest.cc b/components/update_client/component_patcher_unittest.cc
index ba8fafafafb02ee03c2ab440c6ad0f12ea89f1ac..2079d630e7976fb97d54f180775cb8e1e1e6d653 100644
--- a/components/update_client/component_patcher_unittest.cc
+++ b/components/update_client/component_patcher_unittest.cc
@@ -68,7 +68,7 @@ ComponentPatcherOperationTest::ComponentPatcherOperationTest() {
EXPECT_TRUE(unpack_dir_.CreateUniqueTempDir());
EXPECT_TRUE(input_dir_.CreateUniqueTempDir());
EXPECT_TRUE(installed_dir_.CreateUniqueTempDir());
- installer_ = new ReadOnlyTestInstaller(installed_dir_.path());
+ installer_ = new ReadOnlyTestInstaller(installed_dir_.GetPath());
task_runner_ = base::MessageLoop::current()->task_runner();
}
@@ -79,7 +79,7 @@ ComponentPatcherOperationTest::~ComponentPatcherOperationTest() {
TEST_F(ComponentPatcherOperationTest, CheckCreateOperation) {
EXPECT_TRUE(base::CopyFile(
test_file("binary_output.bin"),
- input_dir_.path().Append(FILE_PATH_LITERAL("binary_output.bin"))));
+ input_dir_.GetPath().Append(FILE_PATH_LITERAL("binary_output.bin"))));
std::unique_ptr<base::DictionaryValue> command_args(
new base::DictionaryValue());
@@ -90,7 +90,7 @@ TEST_F(ComponentPatcherOperationTest, CheckCreateOperation) {
TestCallback callback;
scoped_refptr<DeltaUpdateOp> op = new DeltaUpdateOpCreate();
- op->Run(command_args.get(), input_dir_.path(), unpack_dir_.path(), NULL,
+ op->Run(command_args.get(), input_dir_.GetPath(), unpack_dir_.GetPath(), NULL,
base::Bind(&TestCallback::Set, base::Unretained(&callback)),
task_runner_);
base::RunLoop().RunUntilIdle();
@@ -99,7 +99,7 @@ TEST_F(ComponentPatcherOperationTest, CheckCreateOperation) {
EXPECT_EQ(ComponentUnpacker::kNone, callback.error_);
EXPECT_EQ(0, callback.extra_code_);
EXPECT_TRUE(base::ContentsEqual(
- unpack_dir_.path().Append(FILE_PATH_LITERAL("output.bin")),
+ unpack_dir_.GetPath().Append(FILE_PATH_LITERAL("output.bin")),
test_file("binary_output.bin")));
}
@@ -107,7 +107,7 @@ TEST_F(ComponentPatcherOperationTest, CheckCreateOperation) {
TEST_F(ComponentPatcherOperationTest, CheckCopyOperation) {
EXPECT_TRUE(base::CopyFile(
test_file("binary_output.bin"),
- installed_dir_.path().Append(FILE_PATH_LITERAL("binary_output.bin"))));
+ installed_dir_.GetPath().Append(FILE_PATH_LITERAL("binary_output.bin"))));
std::unique_ptr<base::DictionaryValue> command_args(
new base::DictionaryValue());
@@ -118,7 +118,7 @@ TEST_F(ComponentPatcherOperationTest, CheckCopyOperation) {
TestCallback callback;
scoped_refptr<DeltaUpdateOp> op = new DeltaUpdateOpCopy();
- op->Run(command_args.get(), input_dir_.path(), unpack_dir_.path(),
+ op->Run(command_args.get(), input_dir_.GetPath(), unpack_dir_.GetPath(),
installer_.get(),
base::Bind(&TestCallback::Set, base::Unretained(&callback)),
task_runner_);
@@ -128,7 +128,7 @@ TEST_F(ComponentPatcherOperationTest, CheckCopyOperation) {
EXPECT_EQ(ComponentUnpacker::kNone, callback.error_);
EXPECT_EQ(0, callback.extra_code_);
EXPECT_TRUE(base::ContentsEqual(
- unpack_dir_.path().Append(FILE_PATH_LITERAL("output.bin")),
+ unpack_dir_.GetPath().Append(FILE_PATH_LITERAL("output.bin")),
test_file("binary_output.bin")));
}
@@ -136,9 +136,9 @@ TEST_F(ComponentPatcherOperationTest, CheckCopyOperation) {
TEST_F(ComponentPatcherOperationTest, CheckCourgetteOperation) {
EXPECT_TRUE(base::CopyFile(
test_file("binary_input.bin"),
- installed_dir_.path().Append(FILE_PATH_LITERAL("binary_input.bin"))));
+ installed_dir_.GetPath().Append(FILE_PATH_LITERAL("binary_input.bin"))));
EXPECT_TRUE(base::CopyFile(test_file("binary_courgette_patch.bin"),
- input_dir_.path().Append(FILE_PATH_LITERAL(
+ input_dir_.GetPath().Append(FILE_PATH_LITERAL(
"binary_courgette_patch.bin"))));
std::unique_ptr<base::DictionaryValue> command_args(
@@ -152,7 +152,7 @@ TEST_F(ComponentPatcherOperationTest, CheckCourgetteOperation) {
TestCallback callback;
scoped_refptr<DeltaUpdateOp> op =
CreateDeltaUpdateOp("courgette", NULL /* out_of_process_patcher */);
- op->Run(command_args.get(), input_dir_.path(), unpack_dir_.path(),
+ op->Run(command_args.get(), input_dir_.GetPath(), unpack_dir_.GetPath(),
installer_.get(),
base::Bind(&TestCallback::Set, base::Unretained(&callback)),
task_runner_);
@@ -162,7 +162,7 @@ TEST_F(ComponentPatcherOperationTest, CheckCourgetteOperation) {
EXPECT_EQ(ComponentUnpacker::kNone, callback.error_);
EXPECT_EQ(0, callback.extra_code_);
EXPECT_TRUE(base::ContentsEqual(
- unpack_dir_.path().Append(FILE_PATH_LITERAL("output.bin")),
+ unpack_dir_.GetPath().Append(FILE_PATH_LITERAL("output.bin")),
test_file("binary_output.bin")));
}
@@ -170,10 +170,10 @@ TEST_F(ComponentPatcherOperationTest, CheckCourgetteOperation) {
TEST_F(ComponentPatcherOperationTest, CheckBsdiffOperation) {
EXPECT_TRUE(base::CopyFile(
test_file("binary_input.bin"),
- installed_dir_.path().Append(FILE_PATH_LITERAL("binary_input.bin"))));
- EXPECT_TRUE(base::CopyFile(
- test_file("binary_bsdiff_patch.bin"),
- input_dir_.path().Append(FILE_PATH_LITERAL("binary_bsdiff_patch.bin"))));
+ installed_dir_.GetPath().Append(FILE_PATH_LITERAL("binary_input.bin"))));
+ EXPECT_TRUE(base::CopyFile(test_file("binary_bsdiff_patch.bin"),
+ input_dir_.GetPath().Append(FILE_PATH_LITERAL(
+ "binary_bsdiff_patch.bin"))));
std::unique_ptr<base::DictionaryValue> command_args(
new base::DictionaryValue());
@@ -186,7 +186,7 @@ TEST_F(ComponentPatcherOperationTest, CheckBsdiffOperation) {
TestCallback callback;
scoped_refptr<DeltaUpdateOp> op =
CreateDeltaUpdateOp("bsdiff", NULL /* out_of_process_patcher */);
- op->Run(command_args.get(), input_dir_.path(), unpack_dir_.path(),
+ op->Run(command_args.get(), input_dir_.GetPath(), unpack_dir_.GetPath(),
installer_.get(),
base::Bind(&TestCallback::Set, base::Unretained(&callback)),
task_runner_);
@@ -196,7 +196,7 @@ TEST_F(ComponentPatcherOperationTest, CheckBsdiffOperation) {
EXPECT_EQ(ComponentUnpacker::kNone, callback.error_);
EXPECT_EQ(0, callback.extra_code_);
EXPECT_TRUE(base::ContentsEqual(
- unpack_dir_.path().Append(FILE_PATH_LITERAL("output.bin")),
+ unpack_dir_.GetPath().Append(FILE_PATH_LITERAL("output.bin")),
test_file("binary_output.bin")));
}
« no previous file with comments | « components/tracing/browser/trace_config_file_unittest.cc ('k') | components/upload_list/upload_list_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698