summaryrefslogtreecommitdiffstats
path: root/base/test/test_file_util.h
Commit message (Collapse)AuthorAgeFilesLines
* Fix chrome upload with content uriqinmin@chromium.org2013-11-201-0/+14
| | | | | | | | | | | | For android, the upload file dialog returns files with content uri scheme(content://). This CL makes it possible for upload to work with this new file type. It fixes both the form and fileapi based uploads. BUG=278640 Review URL: https://codereview.chromium.org/75533002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@236192 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 235752 "Fix chrome upload with content uri"qinmin@chromium.org2013-11-181-14/+0
| | | | | | | | | | | | | | | | | | | | | | > Fix chrome upload with content uri > > For android, the upload file dialog returns files with content uri scheme(content://). > This CL makes it possible for upload to work with this new file type. > It fixes both the form and fileapi based uploads. > > The CL follows the same code path used by regular file upload and the content url is encompassed by a FilePath object. > > R=jar@chromium.org, joth@chromium.org, kinuko@chromium.org, mmenke@chromium.org, tsepez@chromium.org > TBR=yfriedman > BUG=278640 > > Review URL: https://codereview.chromium.org/46303005 TBR=qinmin@chromium.org Review URL: https://codereview.chromium.org/65043023 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@235760 0039d316-1c4b-4281-b951-d872f2087c98
* Fix chrome upload with content uriqinmin@chromium.org2013-11-181-0/+14
| | | | | | | | | | | | | | | | For android, the upload file dialog returns files with content uri scheme(content://). This CL makes it possible for upload to work with this new file type. It fixes both the form and fileapi based uploads. The CL follows the same code path used by regular file upload and the content url is encompassed by a FilePath object. R=jar@chromium.org, joth@chromium.org, kinuko@chromium.org, mmenke@chromium.org, tsepez@chromium.org TBR=yfriedman BUG=278640 Review URL: https://codereview.chromium.org/46303005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@235752 0039d316-1c4b-4281-b951-d872f2087c98
* Move file_util::Delete to the base namespacebrettw@chromium.org2013-07-011-1/+1
| | | | | | | | BUG= Review URL: https://codereview.chromium.org/16950028 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@209475 0039d316-1c4b-4281-b951-d872f2087c98
* Delete CopyRecursiveDirNoCache from test_file_util.brettw@chromium.org2013-05-061-10/+10
| | | | | | | | | | | | | | | | This function was used in only one place and the implementation was copy-and-pasted. This replaces the call with a cross-platform implementation in the one file that needs it. This is a reland of r194664 which was a reland of r192940. This version does not attempt to fix the startup test caching bugs I discovered when rewriting the function. I filed bug 237904 for this. BUG= Review URL: https://codereview.chromium.org/14577009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@198539 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 194664 "Delete CopyRecursiveDirNoCache from test_file_util."tonyg@chromium.org2013-05-031-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Broke the results of the startup_benchmark on linux. BUG=237858 > Delete CopyRecursiveDirNoCache from test_file_util. > > This function was used in only one place and that place was wrong. > > The implementation was long and complicated on Windows, and long and > complicated and copied verbatim from elsewhere with 3 lines different on Posix. > > The place it was used was in the proxy launcher when copying the profile. It's > not clear to me why we wouldn't want the profile files in the filesystem cache > when running tests. Quite the opposite, we want the tests to run as fast as > possible. > > The only place this should matter is in the startup tests. And the startup > tests do things to the profile after it gets copied that should page some files > back in! This adds another step to the startup tests to evict the profile files > for cold startup tests only. > > This is a reland of r192940 which crashed on Mac. The previous perf startup > test used the profile directory before it was initialized. That patch was in > turn a reland r191854 which broke the startup test. The previous patch > replaced the CopyRecursive call with CopyDirectory which does something > slightly different. This new patch implements a CopyDirectoryContents function > to do what's required here. TBR=brettw@chromium.org Review URL: https://codereview.chromium.org/14799003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@198175 0039d316-1c4b-4281-b951-d872f2087c98
* Delete CopyRecursiveDirNoCache from test_file_util.brettw@chromium.org2013-04-171-9/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | This function was used in only one place and that place was wrong. The implementation was long and complicated on Windows, and long and complicated and copied verbatim from elsewhere with 3 lines different on Posix. The place it was used was in the proxy launcher when copying the profile. It's not clear to me why we wouldn't want the profile files in the filesystem cache when running tests. Quite the opposite, we want the tests to run as fast as possible. The only place this should matter is in the startup tests. And the startup tests do things to the profile after it gets copied that should page some files back in! This adds another step to the startup tests to evict the profile files for cold startup tests only. This is a reland of r192940 which crashed on Mac. The previous perf startup test used the profile directory before it was initialized. That patch was in turn a reland r191854 which broke the startup test. The previous patch replaced the CopyRecursive call with CopyDirectory which does something slightly different. This new patch implements a CopyDirectoryContents function to do what's required here. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@194664 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 192940 "Delete CopyRecursiveDirNoCache from test_file_util."tonyg@chromium.org2013-04-091-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Likely culprit for startup test crashes on mac. BUG=229665 > Delete CopyRecursiveDirNoCache from test_file_util. > > This function was used in only one place and that place was wrong. > > The implementation was long and complicated on Windows, and long and > complicated and copied verbatim from elsewhere with 3 lines different on Posix. > > The place it was used was in the proxy launcher when copying the profile. It's > not clear to me why we wouldn't want the profile files in the filesystem cache > when running tests. Quite the opposite, we want the tests to run as fast as > possible. > > The only place this should matter is in the startup tests. And the startup > tests do things to the profile after it gets copied that should page some files > back in! This adds another step to the startup tests to evict the profile files > for cold startup tests only. > > This is a reland of r191854 which broke the startup test. The previous patch replaced the CopyRecursive call with CopyDirectory which does something slightly different. This new patch implements a CopyDirectoryContents function to do what's required here. > > patch from issue 13394003 > > Review URL: https://codereview.chromium.org/13646016 TBR=brettw@chromium.org Review URL: https://codereview.chromium.org/13958002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@193253 0039d316-1c4b-4281-b951-d872f2087c98
* Delete CopyRecursiveDirNoCache from test_file_util.brettw@chromium.org2013-04-081-9/+0
| | | | | | | | | | | | | | | | | | | | | | | | | This function was used in only one place and that place was wrong. The implementation was long and complicated on Windows, and long and complicated and copied verbatim from elsewhere with 3 lines different on Posix. The place it was used was in the proxy launcher when copying the profile. It's not clear to me why we wouldn't want the profile files in the filesystem cache when running tests. Quite the opposite, we want the tests to run as fast as possible. The only place this should matter is in the startup tests. And the startup tests do things to the profile after it gets copied that should page some files back in! This adds another step to the startup tests to evict the profile files for cold startup tests only. This is a reland of r191854 which broke the startup test. The previous patch replaced the CopyRecursive call with CopyDirectory which does something slightly different. This new patch implements a CopyDirectoryContents function to do what's required here. patch from issue 13394003 Review URL: https://codereview.chromium.org/13646016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@192940 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 191854 "Delete CopyRecursiveDirNoCache from test_file_util."sullivan@chromium.org2013-04-041-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | > Delete CopyRecursiveDirNoCache from test_file_util. > > This function was used in only one place and that place was wrong. > > The implementation was long and complicated on Windows, and long and > complicated and copied verbatim from elsewhere with 3 lines different on Posix. > > The place it was used was in the proxy launcher when copying the profile. It's > not clear to me why we wouldn't want the profile files in the filesystem cache > when running tests. Quite the opposite, we want the tests to run as fast as > possible. > > The only place this should matter is in the startup tests. And the startup > tests do things to the profile after it gets copied that should page some files > back in! This adds another step to the startup tests to evict the profile files > for cold startup tests only. > > BUG= > > Review URL: https://codereview.chromium.org/13394003 TBR=brettw@chromium.org BUG=226099 Review URL: https://codereview.chromium.org/13459005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@192335 0039d316-1c4b-4281-b951-d872f2087c98
* Delete CopyRecursiveDirNoCache from test_file_util.brettw@chromium.org2013-04-021-9/+0
| | | | | | | | | | | | | | | | | | | | | | | This function was used in only one place and that place was wrong. The implementation was long and complicated on Windows, and long and complicated and copied verbatim from elsewhere with 3 lines different on Posix. The place it was used was in the proxy launcher when copying the profile. It's not clear to me why we wouldn't want the profile files in the filesystem cache when running tests. Quite the opposite, we want the tests to run as fast as possible. The only place this should matter is in the startup tests. And the startup tests do things to the profile after it gets copied that should page some files back in! This adds another step to the startup tests to evict the profile files for cold startup tests only. BUG= Review URL: https://codereview.chromium.org/13394003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@191854 0039d316-1c4b-4281-b951-d872f2087c98
* Move file_path.h to base/files.brettw@chromium.org2013-02-241-1/+1
| | | | | | TBR=sky git-svn-id: svn://svn.chromium.org/chrome/trunk/src@184344 0039d316-1c4b-4281-b951-d872f2087c98
* Add FilePath to base namespace.brettw@chromium.org2013-02-021-12/+14
| | | | | | | This updates headers that forward-declare it and a few random places to use the namespace explicitly. There us a using declaration in file_path.h that makes the rest compile, which we can do in future passes. Review URL: https://codereview.chromium.org/12163003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@180245 0039d316-1c4b-4281-b951-d872f2087c98
* Remove the rest of #pragma once in one big CL.ajwong@chromium.org2012-07-111-1/+0
| | | | | | | | | For context see this thread: https://groups.google.com/a/chromium.org/forum/?fromgroups#!topic/chromium-dev/RMcVNGjB4II TBR=thakis,pkasting,jam git-svn-id: svn://svn.chromium.org/chrome/trunk/src@146163 0039d316-1c4b-4281-b951-d872f2087c98
* Added read-only file error test.ahendrickson@chromium.org2012-03-141-1/+16
| | | | | | | | | | | Depends on CLs 9568003 and 9570005. BUG=None TEST=None Review URL: http://codereview.chromium.org/9355050 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@126541 0039d316-1c4b-4281-b951-d872f2087c98
* Move test utilities into test_file_util.*.ahendrickson@chromium.org2011-09-021-0/+7
| | | | | | | | | | | | | Split from CL 7134019. brettw: base. BUG=None TEST=None Review URL: http://codereview.chromium.org/7740081 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@99416 0039d316-1c4b-4281-b951-d872f2087c98
* wstring: remove some simple uses of FromWStringHackevan@chromium.org2011-03-151-0/+1
| | | | | | | | BUG=76112 Review URL: http://codereview.chromium.org/6695008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@78247 0039d316-1c4b-4281-b951-d872f2087c98
* wstring: allow converting FilePath to wstring in testsevan@chromium.org2011-03-031-0/+7
| | | | | | | | | | | | Many of our tests want to use Unicode literal strings with the L"foobar" syntax. Allow us to test FilePaths against these strings. BUG=69467 Review URL: http://codereview.chromium.org/6606025 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@76763 0039d316-1c4b-4281-b951-d872f2087c98
* Fix Downloads Windows Zone identifier test.rdsmith@chromium.org2011-02-231-0/+3
| | | | | | | | | | | Changes the setting of the Zone Identifier to not include an unnecessary trailing null byte, modifies the test to check for any of a range of options known to be acceptable to Windows, and makes explicit the restriction the utility test function works under. BUG=20809 TEST=Test run on windows and successful try bot run (with test enabled). Review URL: http://codereview.chromium.org/6541003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@75762 0039d316-1c4b-4281-b951-d872f2087c98
* Initial conversion of download unit test to browser test with enhancedrdsmith@google.com2010-11-241-0/+8
| | | | | | | | | | | download completion detection (DownloadsObserver). BUG=None TEST=browser_tests --gtest_filter=DownloadTest.DownloadMimeType Review URL: http://codereview.chromium.org/4658001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@67279 0039d316-1c4b-4281-b951-d872f2087c98
* FBTF: Remove unneeded #includes of <string> and <vector> from src/app and ↵viettrungluu@chromium.org2010-08-141-3/+1
| | | | | | | | | | | src/base. BUG=none TEST=builds Review URL: http://codereview.chromium.org/3173020 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@56144 0039d316-1c4b-4281-b951-d872f2087c98
* `#pragma once` for app, base, chrome, gfx, ipc, net, skia, viewsthakis@chromium.org2010-07-261-0/+1
| | | | | | | | | BUG=50273 TEST=everything still builds, build is 10% faster on windows, same speed on mac/linux TBR: erg git-svn-id: svn://svn.chromium.org/chrome/trunk/src@53716 0039d316-1c4b-4281-b951-d872f2087c98
* Style cleanup in preparation for auto-linting base/.erg@google.com2010-01-261-3/+3
| | | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/552004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@37164 0039d316-1c4b-4281-b951-d872f2087c98
* Convert a CopyRecursiveDirNoCache to use FilePaths insteadtony@chromium.org2009-10-121-2/+2
| | | | | | | | | of wstrings. Also convert template_user_data_ in UITest to be a FilePath. Review URL: http://codereview.chromium.org/273021 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28762 0039d316-1c4b-4281-b951-d872f2087c98
* Move more ICU-dependent stuff from base into base/i18n. Some test stuff alsobrettw@chromium.org2009-10-091-0/+36
depended on this, so to make the DEPS work out, I made a new base/test directory where I moved the testing-related files into a new directory base/test. TEST=none BUG=none Review URL: http://codereview.chromium.org/266038 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28569 0039d316-1c4b-4281-b951-d872f2087c98