summaryrefslogtreecommitdiffstats
path: root/webkit
diff options
context:
space:
mode:
authorevan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-04-29 20:12:39 +0000
committerevan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-04-29 20:12:39 +0000
commitc9761f83eb776a6981d8f8c60e4f6319df0bc641 (patch)
treef3e6c82ed73941a7147fe71c2753075bc7367746 /webkit
parent9faeded93d44c81c50c3d4ebfa3009c60f08a4c4 (diff)
downloadchromium_src-c9761f83eb776a6981d8f8c60e4f6319df0bc641.zip
chromium_src-c9761f83eb776a6981d8f8c60e4f6319df0bc641.tar.gz
chromium_src-c9761f83eb776a6981d8f8c60e4f6319df0bc641.tar.bz2
test_shell: allow relative paths on the command line
This makes "./out/Debug/test_shell path/to/file.html" do the right thing. In theory I should use URLFixerUpper but that's deep inside chrome/browser/; this is simple enough anyway. Review URL: http://codereview.chromium.org/1711024 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@45977 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit')
-rw-r--r--webkit/tools/test_shell/test_shell_main.cc7
1 files changed, 4 insertions, 3 deletions
diff --git a/webkit/tools/test_shell/test_shell_main.cc b/webkit/tools/test_shell/test_shell_main.cc
index 37c26bc..e2eb950 100644
--- a/webkit/tools/test_shell/test_shell_main.cc
+++ b/webkit/tools/test_shell/test_shell_main.cc
@@ -224,9 +224,10 @@ int main(int argc, char* argv[]) {
if (url.is_valid()) {
starting_url = url;
} else {
- // Treat as a file path
- starting_url =
- net::FilePathToFileURL(FilePath::FromWStringHack(loose_values[0]));
+ // Treat as a relative file path.
+ FilePath path = FilePath::FromWStringHack(loose_values[0]);
+ file_util::AbsolutePath(&path);
+ starting_url = net::FilePathToFileURL(path);
}
}