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

Unified Diff: base/file_version_info_unittest.cc

Issue 193047: Fix to use FilePath version of PathService::Get.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
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 | « base/file_version_info.cc ('k') | chrome/browser/blocked_popup_container_interactive_uitest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/file_version_info_unittest.cc
===================================================================
--- base/file_version_info_unittest.cc (revision 25670)
+++ base/file_version_info_unittest.cc (working copy)
@@ -13,12 +13,12 @@
class FileVersionInfoTest : public testing::Test {
};
-std::wstring GetTestDataPath() {
- std::wstring path;
+FilePath GetTestDataPath() {
+ FilePath path;
PathService::Get(base::DIR_SOURCE_ROOT, &path);
- file_util::AppendToPath(&path, L"base");
- file_util::AppendToPath(&path, L"data");
- file_util::AppendToPath(&path, L"file_version_info_unittest");
+ path = path.AppendASCII("base");
+ path = path.AppendASCII("data");
+ path = path.AppendASCII("file_version_info_unittest");
return path;
}
@@ -27,7 +27,7 @@
#ifdef OS_WIN
TEST(FileVersionInfoTest, HardCodedProperties) {
const wchar_t* kDLLNames[] = {
- L"FileVersionInfoTest1.dll"
+ L"FileVersionInfoTest1.dll"
};
const wchar_t* kExpectedValues[1][15] = {
@@ -47,12 +47,11 @@
L"This is the legal copyright", // legal_copyright
L"This is the legal trademarks", // legal_trademarks
L"This is the last change", // last_change
-
};
for (int i = 0; i < arraysize(kDLLNames); ++i) {
- std::wstring dll_path = GetTestDataPath();
- file_util::AppendToPath(&dll_path, kDLLNames[i]);
+ FilePath dll_path = GetTestDataPath();
+ dll_path = dll_path.Append(kDLLNames[i]);
scoped_ptr<FileVersionInfo> version_info(
FileVersionInfo::CreateFileVersionInfo(dll_path));
@@ -93,8 +92,8 @@
ASSERT_EQ(arraysize(kDLLNames), arraysize(kExpected));
for (int i = 0; i < arraysize(kDLLNames); ++i) {
- std::wstring dll_path = GetTestDataPath();
- file_util::AppendToPath(&dll_path, kDLLNames[i]);
+ FilePath dll_path = GetTestDataPath();
+ dll_path = dll_path.Append(kDLLNames[i]);
scoped_ptr<FileVersionInfo> version_info(
FileVersionInfo::CreateFileVersionInfo(dll_path));
@@ -105,8 +104,8 @@
#endif
TEST(FileVersionInfoTest, CustomProperties) {
- std::wstring dll_path = GetTestDataPath();
- file_util::AppendToPath(&dll_path, L"FileVersionInfoTest1.dll");
+ FilePath dll_path = GetTestDataPath();
+ dll_path = dll_path.AppendASCII("FileVersionInfoTest1.dll");
scoped_ptr<FileVersionInfo> version_info(
FileVersionInfo::CreateFileVersionInfo(dll_path));
« no previous file with comments | « base/file_version_info.cc ('k') | chrome/browser/blocked_popup_container_interactive_uitest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698