summaryrefslogtreecommitdiffstats
path: root/base/file_util_unittest.cc
Commit message (Collapse)AuthorAgeFilesLines
* Remove uses of deprecated version of FileUtil::ResolveShortcut.evan@chromium.org2009-08-251-6/+5
| | | | | | | | | | BUG=None TEST=run base_unittests.exe Review URL: http://codereview.chromium.org/173181 Patch from Thiago Farina <thiago.farina@gmail.com>. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24208 0039d316-1c4b-4281-b951-d872f2087c98
* Renames the function CreateTemporaryFilename to CreateTemporaryFile and ↵erikkay@chromium.org2009-08-181-4/+4
| | | | | | | | | | | | | | track down all callers, also removes the deprecated function that uses std::wstring. BUG=3078 (http://crbug.com/3078) TEST=run base_unittests, installer_util_unittests, net_unittests, setup_unittests, and unit_tests. Review URL: http://codereview.chromium.org/164537 Patch from Thiago Farina. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@23631 0039d316-1c4b-4281-b951-d872f2087c98
* Use platform-appropriate newlines in JSON output.mark@chromium.org2009-06-261-0/+50
| | | | | | | | BUG=15462 TEST=base_unittests, unit_tests, check newlines in bookmarks file Review URL: http://codereview.chromium.org/147220 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19418 0039d316-1c4b-4281-b951-d872f2087c98
* Move PathComponents from file_util to FilePath, add FilePath::IsParent()rafaelw@chromium.org2009-06-241-51/+0
| | | | | | | | r=erikkay,mark Review URL: http://codereview.chromium.org/145026 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19174 0039d316-1c4b-4281-b951-d872f2087c98
* Pass through non-character codepoints in UTF-8,16,32 and Wide conversion ↵jshin@chromium.org2009-06-241-2/+3
| | | | | | | | | | | | | | | | | | | | functions. They're structurally valid code points unlike malformed byte/surrogate sequences. I believe it's better to leave them alone in conversion functions. This CL was triggered by file_util_unittest failure on Linux/Mac with my upcoming change to file_util::ReplaceIllegalCharacters (a part of http://codereview.chromium.org/126223 ). In addition, the upper bound for the output length in CodepageToWide was tightened. TEST=pass string_util and file_util unittests BUG=NONE Review URL: http://codereview.chromium.org/147038 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19132 0039d316-1c4b-4281-b951-d872f2087c98
* Order posix file listings by type as well as name.estade@chromium.org2009-06-241-2/+19
| | | | | | | | | http://crbug.com/12812 TEST=go to /, see that directories are sorted before other files. Review URL: http://codereview.chromium.org/147063 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19100 0039d316-1c4b-4281-b951-d872f2087c98
* Include a parent directory link in the file list for file:///somepathyuzo@chromium.org2009-06-091-10/+65
| | | | | | | | | | | | | | | Also, order files/directories lexicographically. TEST=on linux, type file:///usr/ in the address bar and make sure the contents are sorted and include an entry for '..', which is [parent directory]. On windows, type file:///C:/Users/ . BUG=12621, 12812 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17933 0039d316-1c4b-4281-b951-d872f2087c98
* Submitting http://codereview.chromium.org/87039 on behalf of hamaji.erikkay@google.com2009-04-231-2/+3
| | | | | | Review URL: http://codereview.chromium.org/92053 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14304 0039d316-1c4b-4281-b951-d872f2087c98
* Implement file_util::CountFilesCreatedAfter() for posix environments.evan@chromium.org2009-04-211-3/+6
| | | | | | | | | BUG=9833 Review URL: http://codereview.chromium.org/87003 Patch from Shinichiro Hamaji <hamaji@google.com>. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14081 0039d316-1c4b-4281-b951-d872f2087c98
* Retrial of the first step to port file_util::CountFilesCreatedAfter()erikkay@google.com2009-04-181-10/+7
| | | | | | | | | Submitting http://codereview.chromium.org/75033 on behalf of hamaji Review URL: http://codereview.chromium.org/67276 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@13993 0039d316-1c4b-4281-b951-d872f2087c98
* Reverting 13748.erikkay@google.com2009-04-151-7/+10
| | | | | | Review URL: http://codereview.chromium.org/73084 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@13751 0039d316-1c4b-4281-b951-d872f2087c98
* Submitting http://codereview.chromium.org/73075 on behalf of ↵erikkay@google.com2009-04-151-10/+7
| | | | | | | | shinichiro.hamaji@gmail.com Review URL: http://codereview.chromium.org/73083 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@13748 0039d316-1c4b-4281-b951-d872f2087c98
* Reduce usage of {To,From}WStringHack in file_util_unittest.ccphajdan.jr@chromium.org2009-04-031-58/+60
| | | | | | Review URL: http://codereview.chromium.org/62008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@13087 0039d316-1c4b-4281-b951-d872f2087c98
* file_util::Move fails on Windows if moving a directoryhuanr@chromium.org2009-03-111-0/+30
| | | | | | | | | | | across volumes. This change adds a CopyAndDeleteDirectory function, and Move falls back to CopyAndDeleteDirectory if moving directory fails. BUG=8505 Review URL: http://codereview.chromium.org/43069 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11460 0039d316-1c4b-4281-b951-d872f2087c98
* Move FilePathTest under test_dir_ so it gets cleaned up on TearDown.thestig@chromium.org2009-03-101-3/+1
| | | | | | Review URL: http://codereview.chromium.org/41023 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11349 0039d316-1c4b-4281-b951-d872f2087c98
* Properly honor base::SharedMemory semantics for name="" to meanjrg@chromium.org2009-02-041-5/+41
| | | | | | | | | | | | new/private shared memory on POSIX. Transition base::SharedMemory implementation to file/mmap() to prevent leaking of wired kernel resources and allow easier cleanup. Enable one more shared_memory unit test for POSIX. Enable stats_table_unittest.cc for Mac, and modify it so it cleans up. Review URL: http://codereview.chromium.org/19724 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9114 0039d316-1c4b-4281-b951-d872f2087c98
* Make sure that Clipboard operations that require dispatchingrvargas@google.com2009-01-311-1/+3
| | | | | | | | | | | | | | | | | | | | of windows messages are performed on the UI thread. SetClipboardData requires the clipboard to be open with a handle to a window that will be notified when the contents are going to change again. If Windows messages are not processed, any other app writing to the clipboard will be locked while we acknowledge their request (by processing the message). The IO thread doesn't pump windows messages anymore so write clipboard operations cannot be performed from that thread and have to be posted to another thread. BUG=5823 Review URL: http://codereview.chromium.org/19733 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9003 0039d316-1c4b-4281-b951-d872f2087c98
* Move Contains() method to file_utils, stop relying on in extensions_protocolaa@chromium.org2009-01-091-0/+46
| | | | | | Review URL: http://codereview.chromium.org/16805 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@7841 0039d316-1c4b-4281-b951-d872f2087c98
* Move file enumeration to filepaths.avi@google.com2008-12-111-16/+17
| | | | | | Review URL: http://codereview.chromium.org/13315 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@6784 0039d316-1c4b-4281-b951-d872f2087c98
* Get rid of kPathSeparator on windows. Port some wstring function to take ↵estade@chromium.org2008-12-041-63/+57
| | | | | | | | FilePaths. Re-enable relevant posix unit tests. Review URL: http://codereview.chromium.org/12893 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@6387 0039d316-1c4b-4281-b951-d872f2087c98
* * Cleanup: move base/platform_test.h -> testing/jeremy@chromium.org2008-12-021-1/+1
| | | | | | | | * Add support for "Debug On Start" switch to MultiprocessTest::SpawnChild Review URL: http://codereview.chromium.org/13052 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@6227 0039d316-1c4b-4281-b951-d872f2087c98
* Remove file_util::kPathSeparator from posix.estade@chromium.org2008-11-271-0/+58
| | | | | | Review URL: http://codereview.chromium.org/12489 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@6099 0039d316-1c4b-4281-b951-d872f2087c98
* Added CreateTemporaryFileName that takes a FilePath argument.estade@chromium.org2008-11-111-2/+2
| | | | | | Review URL: http://codereview.chromium.org/9752 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@5142 0039d316-1c4b-4281-b951-d872f2087c98
* Begin the first small step towards using FilePath everywhere:evanm@google.com2008-10-301-172/+162
| | | | | | | | | | - Add some transition APIs. - Start migrating some code to transition APIs. Review URL: http://codereview.chromium.org/8825 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@4254 0039d316-1c4b-4281-b951-d872f2087c98
* Fix FileEnumerator (win) for non-recursive, directory-only enumerations.tim@chromium.org2008-10-161-0/+8
| | | | | | | | It previously only actually returned directories for recursive traversals. Review URL: http://codereview.chromium.org/7157 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@3450 0039d316-1c4b-4281-b951-d872f2087c98
* Fixes bug in file_util::ReplaceExtension that could chop off pathsky@google.com2008-09-191-0/+12
| | | | | | | | | | | elements. This was causing some folks bookmarks not to get saved! BUG=1946 TEST=covered by unit tests Review URL: http://codereview.chromium.org/2990 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2412 0039d316-1c4b-4281-b951-d872f2087c98
* Implement CopyDirectory() for the POSIX branch of file_util.evanm@google.com2008-09-181-3/+0
| | | | | | | This lets us pass some more base unit tests and at least one net test. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2372 0039d316-1c4b-4281-b951-d872f2087c98
* CreateDirectory() should check if an existing path is actually a directory ↵mmoss@google.com2008-09-111-12/+43
| | | | | | | | before skipping it. Also update a couple instances and comments to reflect current behaviour (see also http://codereview.chromium.org/1681). Review URL: http://codereview.chromium.org/1709 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2060 0039d316-1c4b-4281-b951-d872f2087c98
* Use gcc 4.2 for the Mac build. Fix up new warnings and errors pointed outmark@chromium.org2008-09-101-2/+1
| | | | | | | | | | by gcc 4.2: warning: 'C' has a field 'C::m_' whose type uses the anonymous namespace warning: missing braces around initializer for 'S' error: extra qualification 'C::' on member 'm' Review URL: http://codereview.chromium.org/1675 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1955 0039d316-1c4b-4281-b951-d872f2087c98
* Use a more compact license header in source files.license.bot2008-08-241-28/+4
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1287 0039d316-1c4b-4281-b951-d872f2087c98
* Create a gtest test fixture subclass that allows for platform specific setup ↵erikkay@google.com2008-08-201-3/+10
| | | | | | and teardown hooks. On the Mac use this to create an outer Autorelease pool. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1089 0039d316-1c4b-4281-b951-d872f2087c98
* Cleanup some comment typos.ericroman@google.com2008-08-181-1/+1
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@984 0039d316-1c4b-4281-b951-d872f2087c98
* sigherikkay@google.com2008-08-151-1/+3
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@949 0039d316-1c4b-4281-b951-d872f2087c98
* one more try before reverterikkay@google.com2008-08-151-14/+14
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@948 0039d316-1c4b-4281-b951-d872f2087c98
* Part two of file_util porting. Almost all of the functionality has been ↵erikkay@google.com2008-08-151-59/+188
| | | | | | ported, including the unit tests now. Some of this API isn't great, and should be cleaned up, but I'd like to hold off and do that in a followup changelist. More general code cleanup is likely needed here as well. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@944 0039d316-1c4b-4281-b951-d872f2087c98
* Add base to the repository.initial.commit2008-07-261-0/+777
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8 0039d316-1c4b-4281-b951-d872f2087c98