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 | |
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
-rw-r--r-- | chrome/chrome.gyp | 66 | ||||
-rw-r--r-- | chrome/test/url_fetch_test/url_fetch_test.cc | 11 |
2 files changed, 42 insertions, 35 deletions
diff --git a/chrome/chrome.gyp b/chrome/chrome.gyp index a361350..2f2b4ff 100644 --- a/chrome/chrome.gyp +++ b/chrome/chrome.gyp @@ -3711,6 +3711,43 @@ }], ], }, + { + 'target_name': 'url_fetch_test', + 'type': 'executable', + 'msvs_guid': '7EFD0C91-198E-4043-9E71-4A4C7879B929', + 'dependencies': [ + 'app', + 'test_support_common', + 'test_support_ui', + 'theme_resources', + '../net/net.gyp:net', + '../skia/skia.gyp:skia', + '../testing/gtest.gyp:gtest', + ], + 'include_dirs': [ + '..', + ], + 'sources': [ + 'test/url_fetch_test/url_fetch_test.cc', + ], + 'conditions': [ + ['OS=="win"', { + 'include_dirs': [ + 'third_party/wtl/include', + ], + 'sources': [ + 'tools/build/win/precompiled_wtl.cc', + 'tools/build/win/precompiled_wtl.h', + ], + 'configurations': { + 'Debug': { + 'msvs_precompiled_header': 'tools/build/win/precompiled_wtl.h', + 'msvs_precompiled_source': 'tools/build/win/precompiled_wtl.cc', + }, + }, + }], # OS="win" + ], # conditions + }, ], 'conditions': [ # We set feature variables so the different parts that need to check for @@ -4578,35 +4615,6 @@ }, }, { - 'target_name': 'url_fetch_test', - 'type': 'executable', - 'msvs_guid': '7EFD0C91-198E-4043-9E71-4A4C7879B929', - 'dependencies': [ - 'test_support_common', - 'test_support_ui', - 'theme_resources', - '../net/net.gyp:net', - '../skia/skia.gyp:skia', - '../testing/gtest.gyp:gtest', - ], - 'include_dirs': [ - '..', - 'third_party/wtl/include', - ], - 'sources': [ - 'test/url_fetch_test/url_fetch_test.cc', - - 'tools/build/win/precompiled_wtl.cc', - 'tools/build/win/precompiled_wtl.h', - ], - 'configurations': { - 'Debug': { - 'msvs_precompiled_header': 'tools/build/win/precompiled_wtl.h', - 'msvs_precompiled_source': 'tools/build/win/precompiled_wtl.cc', - }, - }, - }, - { 'target_name': 'worker', 'type': '<(library)', 'msvs_guid': 'C78D02D0-A366-4EC6-A248-AA8E64C4BA18', 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 |