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

Unified Diff: webkit/tools/test_shell/test_shell_gtk.cc

Issue 12489: Remove file_util::kPathSeparator from posix. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 12 years, 1 month 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 | « webkit/glue/dom_serializer_unittest.cc ('k') | webkit/tools/test_shell/test_shell_mac.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/tools/test_shell/test_shell_gtk.cc
===================================================================
--- webkit/tools/test_shell/test_shell_gtk.cc (revision 6039)
+++ webkit/tools/test_shell/test_shell_gtk.cc (working copy)
@@ -532,6 +532,7 @@
file_path);
}
+// static
std::string TestShell::RewriteLocalUrl(const std::string& url) {
// Convert file:///tmp/LayoutTests urls to the actual location on disk.
const char kPrefix[] = "file:///tmp/LayoutTests/";
@@ -539,18 +540,14 @@
std::string new_url(url);
if (url.compare(0, kPrefixLen, kPrefix, kPrefixLen) == 0) {
- std::wstring replace_url;
- PathService::Get(base::DIR_EXE, &replace_url);
- file_util::UpOneDirectory(&replace_url);
- file_util::UpOneDirectory(&replace_url);
- file_util::AppendToPath(&replace_url, L"webkit");
- file_util::AppendToPath(&replace_url, L"data");
- file_util::AppendToPath(&replace_url, L"layout_tests");
- file_util::AppendToPath(&replace_url, L"LayoutTests");
- replace_url.push_back(file_util::kPathSeparator);
- new_url = std::string("file:///") +
- WideToUTF8(replace_url).append(url.substr(kPrefixLen));
+ FilePath replace_path;
+ PathService::Get(base::DIR_EXE, &replace_path);
+ replace_path = replace_path.DirName().DirName().Append(
+ "webkit/data/layout_tests/LayoutTests/");
+ new_url = std::string("file://") + replace_path.value() +
+ url.substr(kPrefixLen);
}
+
return new_url;
}
« no previous file with comments | « webkit/glue/dom_serializer_unittest.cc ('k') | webkit/tools/test_shell/test_shell_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698