diff options
author | thomasvl@chromium.org <thomasvl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-06-16 14:04:06 +0000 |
---|---|---|
committer | thomasvl@chromium.org <thomasvl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-06-16 14:04:06 +0000 |
commit | 31b7324db9c531975aeffdaacc6f0c19e2d9a4e6 (patch) | |
tree | 58cc68a269af3b6d5b1fb2fbfd7a251f8ae05b6b /chrome/test | |
parent | be6bf5ebfb55b6eb2ef55870e30c102a4d7fd46c (diff) | |
download | chromium_src-31b7324db9c531975aeffdaacc6f0c19e2d9a4e6.zip chromium_src-31b7324db9c531975aeffdaacc6f0c19e2d9a4e6.tar.gz chromium_src-31b7324db9c531975aeffdaacc6f0c19e2d9a4e6.tar.bz2 |
Bring url_fetch_test into compiling shape on mac/linux.
Review URL: http://codereview.chromium.org/126072
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18488 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/test')
-rw-r--r-- | chrome/test/url_fetch_test/url_fetch_test.cc | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/chrome/test/url_fetch_test/url_fetch_test.cc b/chrome/test/url_fetch_test/url_fetch_test.cc index b48ff96..58d096a 100644 --- a/chrome/test/url_fetch_test/url_fetch_test.cc +++ b/chrome/test/url_fetch_test/url_fetch_test.cc @@ -54,13 +54,10 @@ class UrlFetchTest : public UITest { } }; -} // namespace - - bool writeValueToFile(std::string value, std::wstring filePath) { int retval = file_util::WriteFile( - FilePath(filePath), value.c_str(), value.length()); - return retval == value.length(); + FilePath::FromWStringHack(filePath), value.c_str(), value.length()); + return retval == static_cast<int>(value.length()); } // To actually do anything useful, this test should have a url @@ -102,7 +99,7 @@ TEST_F(UrlFetchTest, UrlFetch) { std::wstring jsvar = cmdLine->GetSwitchValue(L"jsvar"); UrlFetchTestResult result; - RunTest(GURL(cmdLine->GetSwitchValue(L"url")), + RunTest(GURL(WideToASCII(cmdLine->GetSwitchValue(L"url"))), cookieName.length() > 0 ? cookieName.c_str() : NULL, cookieValue.length() > 0 ? cookieValue.c_str() : NULL, jsvar.length() > 0 ? jsvar.c_str() : NULL, @@ -121,3 +118,5 @@ TEST_F(UrlFetchTest, UrlFetch) { ASSERT_TRUE(writeValueToFile(result.javascript_variable, jsvarOutputPath)); } } + +} // namespace |