From 35aaff4248618afd4d2a5fc7ab728bc5a9bcddd9 Mon Sep 17 00:00:00 2001 From: "asanka@chromium.org" Date: Thu, 26 May 2011 16:49:24 +0000 Subject: Add '?' to the list of characters escaped when constructing a file:// URL BUG=83514 TEST=net_unittests --gtest_filter=NetUtilTest.FileURLConversion Review URL: http://codereview.chromium.org/6990038 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@86836 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/test/ui_test_utils.cc | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'chrome/test/ui_test_utils.cc') diff --git a/chrome/test/ui_test_utils.cc b/chrome/test/ui_test_utils.cc index 77ce4ff..f6a90d2 100644 --- a/chrome/test/ui_test_utils.cc +++ b/chrome/test/ui_test_utils.cc @@ -537,6 +537,17 @@ GURL GetTestUrl(const FilePath& dir, const FilePath& file) { return net::FilePathToFileURL(GetTestFilePath(dir, file)); } +GURL GetFileUrlWithQuery(const FilePath& path, + const std::string& query_string) { + GURL url = net::FilePathToFileURL(path); + if (!query_string.empty()) { + GURL::Replacements replacements; + replacements.SetQueryStr(query_string); + return url.ReplaceComponents(replacements); + } + return url; +} + AppModalDialog* WaitForAppModalDialog() { TestNotificationObserver observer; RegisterAndWait(&observer, NotificationType::APP_MODAL_DIALOG_SHOWN, -- cgit v1.1