diff options
author | yzshen@chromium.org <yzshen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-05-23 22:00:04 +0000 |
---|---|---|
committer | yzshen@chromium.org <yzshen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-05-23 22:00:04 +0000 |
commit | b2f2308d0c635418caa3ad2a2560a2778d70a4d5 (patch) | |
tree | daaa5177eb28ddcb2d5582a4e78cf7b0318aea07 /ppapi/tests/test_file_ref.cc | |
parent | 10b6e62953ff6ebc0ac9e7cb7628677da273f79b (diff) | |
download | chromium_src-b2f2308d0c635418caa3ad2a2560a2778d70a4d5.zip chromium_src-b2f2308d0c635418caa3ad2a2560a2778d70a4d5.tar.gz chromium_src-b2f2308d0c635418caa3ad2a2560a2778d70a4d5.tar.bz2 |
Fix PP_FileOpenFlags_Dev handling:
- rewrite the mapping from PP_FileOpenFlags_Dev to PlatformFileFlags.
- let ppb_flash_file_impl and ppb_file_io_impl use the same mapping logic.
- CreatePlatformFile: resolve the conflict between the win and posix implementation. Before this change, the win implementation didn't allow PLATFORM_FILE_TRUNCATE to be used with any of the (OPEN|CREATE)(_ALWAYS)? flags; while the posix implementation required it to be used with them.
- add more test cases to test the behavior of different PP_FileOpenFlags_Dev combinations.
- also unify the conversion from PlatformFileError to Pepper error.
BUG=68489
TEST=New test cases in test_file_io.cc
Review URL: http://codereview.chromium.org/7038032
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@86349 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ppapi/tests/test_file_ref.cc')
-rw-r--r-- | ppapi/tests/test_file_ref.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/ppapi/tests/test_file_ref.cc b/ppapi/tests/test_file_ref.cc index c448927..2fa8e5b 100644 --- a/ppapi/tests/test_file_ref.cc +++ b/ppapi/tests/test_file_ref.cc @@ -325,7 +325,9 @@ std::string TestFileRef::TestQueryAndTouchFile() { pp::FileRef_Dev file_ref(file_system, "/file_touch"); pp::FileIO_Dev file_io(instance_); rv = file_io.Open(file_ref, - PP_FILEOPENFLAG_CREATE | PP_FILEOPENFLAG_WRITE, + PP_FILEOPENFLAG_CREATE | + PP_FILEOPENFLAG_TRUNCATE | + PP_FILEOPENFLAG_WRITE, callback); if (rv == PP_OK_COMPLETIONPENDING) rv = callback.WaitForResult(); |