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

Unified Diff: base/file_path_unittest.cc

Issue 18134: Add AppendASCII (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 11 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_path.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/file_path_unittest.cc
===================================================================
--- base/file_path_unittest.cc (revision 8363)
+++ base/file_path_unittest.cc (working copy)
@@ -5,7 +5,7 @@
#include "base/basictypes.h"
#include "base/file_path.h"
#include "base/file_util.h"
-#include "base/path_service.h"
+#include "base/string_util.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "testing/platform_test.h"
@@ -293,6 +293,17 @@
FilePath observed_path = root.Append(FilePath(leaf));
EXPECT_EQ(FilePath::StringType(cases[i].expected), observed_path.value()) <<
"i: " << i << ", root: " << root.value() << ", leaf: " << leaf;
+
+ // TODO(erikkay): It would be nice to have a unicode test append value to
+ // handle the case when AppendASCII is passed UTF8
+#if defined(OS_WIN)
+ std::string ascii = WideToASCII(leaf);
+#elif defined(OS_POSIX)
+ std::string ascii = leaf;
+#endif
+ observed_str = root.AppendASCII(ascii);
+ EXPECT_EQ(FilePath::StringType(cases[i].expected), observed_str.value()) <<
+ "i: " << i << ", root: " << root.value() << ", leaf: " << leaf;
}
}
« no previous file with comments | « base/file_path.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698