summaryrefslogtreecommitdiffstats
path: root/webkit/tools/test_shell/test_shell_gtk.cc
diff options
context:
space:
mode:
authorestade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2008-11-27 04:03:57 +0000
committerestade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2008-11-27 04:03:57 +0000
commitb9e04f0654a99b6bb0b626df14e15ec4f9a8bf9d (patch)
tree3b738efc6107e6ea501790f0a8ba26c7d041ed3d /webkit/tools/test_shell/test_shell_gtk.cc
parentf6c1f2470b243628a36981efae7c3a6ce3914a92 (diff)
downloadchromium_src-b9e04f0654a99b6bb0b626df14e15ec4f9a8bf9d.zip
chromium_src-b9e04f0654a99b6bb0b626df14e15ec4f9a8bf9d.tar.gz
chromium_src-b9e04f0654a99b6bb0b626df14e15ec4f9a8bf9d.tar.bz2
Remove file_util::kPathSeparator from posix.
Review URL: http://codereview.chromium.org/12489 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@6099 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/tools/test_shell/test_shell_gtk.cc')
-rw-r--r--webkit/tools/test_shell/test_shell_gtk.cc19
1 files changed, 8 insertions, 11 deletions
diff --git a/webkit/tools/test_shell/test_shell_gtk.cc b/webkit/tools/test_shell/test_shell_gtk.cc
index 52cf2a0..0dabe3e 100644
--- a/webkit/tools/test_shell/test_shell_gtk.cc
+++ b/webkit/tools/test_shell/test_shell_gtk.cc
@@ -532,6 +532,7 @@ void TestShell::DumpRenderTree()
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 TestShell::RewriteLocalUrl(const std::string& url) {
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;
}