diff options
author | thestig@chromium.org <thestig@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-03-31 08:56:47 +0000 |
---|---|---|
committer | thestig@chromium.org <thestig@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-03-31 08:56:47 +0000 |
commit | 5a145436666621448c8eafab5006413986137934 (patch) | |
tree | 76f165cabc2d6e4b3fa396598b435fceabae621d /chrome/test/ui_test_utils.cc | |
parent | df0a0bfe0ea219ede803adfd600d95584d6e8c0d (diff) | |
download | chromium_src-5a145436666621448c8eafab5006413986137934.zip chromium_src-5a145436666621448c8eafab5006413986137934.tar.gz chromium_src-5a145436666621448c8eafab5006413986137934.tar.bz2 |
Merge UiTest::GetTest* and ui_test_utils::GetTest*. Convert these utility functions to use FilePaths.
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/1567009
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@43190 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/test/ui_test_utils.cc')
-rw-r--r-- | chrome/test/ui_test_utils.cc | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/chrome/test/ui_test_utils.cc b/chrome/test/ui_test_utils.cc index 4dd4859..96d04b6 100644 --- a/chrome/test/ui_test_utils.cc +++ b/chrome/test/ui_test_utils.cc @@ -6,6 +6,7 @@ #include <vector> +#include "base/file_path.h" #include "base/json/json_reader.h" #include "base/message_loop.h" #include "base/path_service.h" @@ -550,12 +551,14 @@ bool ExecuteJavaScriptAndExtractString(RenderViewHost* render_view_host, return value->GetAsString(result); } -GURL GetTestUrl(const std::wstring& dir, const std::wstring file) { +FilePath GetTestFilePath(const FilePath& dir, const FilePath& file) { FilePath path; PathService::Get(chrome::DIR_TEST_DATA, &path); - path = path.Append(FilePath::FromWStringHack(dir)); - path = path.Append(FilePath::FromWStringHack(file)); - return net::FilePathToFileURL(path); + return path.Append(dir).Append(file); +} + +GURL GetTestUrl(const FilePath& dir, const FilePath& file) { + return net::FilePathToFileURL(GetTestFilePath(dir, file)); } void WaitForDownloadCount(DownloadManager* download_manager, size_t count) { |