summaryrefslogtreecommitdiffstats
path: root/chrome/browser/privacy_blacklist
diff options
context:
space:
mode:
authorphajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-14 19:36:31 +0000
committerphajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-14 19:36:31 +0000
commitb65de8b9d5bfa020d97122c1eff2115fa8e97561 (patch)
tree3eb86aed4e3352cbca7cc4b78e76f5ee26d7388c /chrome/browser/privacy_blacklist
parent5e70f14644629b7f9fe9126553758aed25e17128 (diff)
downloadchromium_src-b65de8b9d5bfa020d97122c1eff2115fa8e97561.zip
chromium_src-b65de8b9d5bfa020d97122c1eff2115fa8e97561.tar.gz
chromium_src-b65de8b9d5bfa020d97122c1eff2115fa8e97561.tar.bz2
Fix to use FilePath in more unittests.
Landing patch for Thiago Farina, original review: http://codereview.chromium.org/187005 BUG=None TEST=run unit_tests.exe, base_unittests.exe. Review URL: http://codereview.chromium.org/193101 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@26142 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/privacy_blacklist')
-rw-r--r--chrome/browser/privacy_blacklist/blacklist_io_unittest.cc24
1 files changed, 9 insertions, 15 deletions
diff --git a/chrome/browser/privacy_blacklist/blacklist_io_unittest.cc b/chrome/browser/privacy_blacklist/blacklist_io_unittest.cc
index cd43449..ccc380a 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));