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

Unified Diff: chrome/browser/privacy_blacklist/blacklist_io_unittest.cc

Issue 193101: Fix to use FilePath in more unittests. (Closed)
Patch Set: Created 11 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
« no previous file with comments | « chrome/browser/printing/printing_layout_uitest.cc ('k') | chrome/installer/setup/setup_util_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/privacy_blacklist/blacklist_io_unittest.cc
diff --git a/chrome/browser/privacy_blacklist/blacklist_io_unittest.cc b/chrome/browser/privacy_blacklist/blacklist_io_unittest.cc
index cd4344918cd68b8450a7c004a16c40b2d8aeb98c..ccc380a6b5669e1814f73e2ab722724741850a93 100644
--- a/chrome/browser/privacy_blacklist/blacklist_io_unittest.cc
+++ b/chrome/browser/privacy_blacklist/blacklist_io_unittest.cc
@@ -16,11 +16,9 @@ TEST(BlacklistIOTest, Generic) {
FilePath data_dir;
PathService::Get(chrome::DIR_TEST_DATA, &data_dir);
- FilePath input =
- data_dir.Append(FilePath::FromWStringHack(L"blacklist_small.pbl"));
+ FilePath input = data_dir.AppendASCII("blacklist_small.pbl");
- FilePath expected =
- data_dir.Append(FilePath::FromWStringHack(L"blacklist_small.pbr"));
+ FilePath expected = data_dir.AppendASCII("blacklist_small.pbr");
BlacklistIO io;
EXPECT_TRUE(io.Read(input));
@@ -40,7 +38,7 @@ TEST(BlacklistIOTest, Generic) {
FilePath output;
PathService::Get(base::DIR_TEMP, &output);
- output = output.Append(FilePath::FromWStringHack(L"blacklist_small.pbr"));
+ output = output.AppendASCII("blacklist_small.pbr");
CHECK(io.Write(output));
EXPECT_TRUE(file_util::ContentsEqual(output, expected));
EXPECT_TRUE(file_util::Delete(output, false));
@@ -50,16 +48,13 @@ TEST(BlacklistIOTest, Combine) {
// Testing data path.
FilePath data_dir;
PathService::Get(chrome::DIR_TEST_DATA, &data_dir);
- data_dir = data_dir.Append(FilePath::FromWStringHack(L"blacklist_samples"));
+ data_dir = data_dir.AppendASCII("blacklist_samples");
- FilePath input1 =
- data_dir.Append(FilePath::FromWStringHack(L"annoying_ads.pbl"));
+ FilePath input1 = data_dir.AppendASCII("annoying_ads.pbl");
- FilePath input2 =
- data_dir.Append(FilePath::FromWStringHack(L"block_flash.pbl"));
+ FilePath input2 = data_dir.AppendASCII("block_flash.pbl");
- FilePath input3 =
- data_dir.Append(FilePath::FromWStringHack(L"session_cookies.pbl"));
+ FilePath input3 = data_dir.AppendASCII("session_cookies.pbl");
BlacklistIO io;
EXPECT_TRUE(io.Read(input1));
@@ -94,10 +89,9 @@ TEST(BlacklistIOTest, Combine) {
FilePath output;
PathService::Get(base::DIR_TEMP, &output);
- output = output.Append(FilePath::FromWStringHack(L"combine3.pbr"));
+ output = output.AppendASCII("combine3.pbr");
- FilePath expected =
- data_dir.Append(FilePath::FromWStringHack(L"combine3.pbr"));
+ FilePath expected = data_dir.AppendASCII("combine3.pbr");
CHECK(io.Write(output));
EXPECT_TRUE(file_util::ContentsEqual(output, expected));
« no previous file with comments | « chrome/browser/printing/printing_layout_uitest.cc ('k') | chrome/installer/setup/setup_util_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698