diff options
author | sanga@chromium.org <sanga@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-07-07 18:34:40 +0000 |
---|---|---|
committer | sanga@chromium.org <sanga@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-07-07 18:34:40 +0000 |
commit | ea505a9d49ef9770557423d2e4525d8fb91eab69 (patch) | |
tree | 7ace0236f95b3d101fd0e392d0506845c23d8223 /ppapi/tests | |
parent | 054498a7c3951d4047812ed918c06d46b3daa6ee (diff) | |
download | chromium_src-ea505a9d49ef9770557423d2e4525d8fb91eab69.zip chromium_src-ea505a9d49ef9770557423d2e4525d8fb91eab69.tar.gz chromium_src-ea505a9d49ef9770557423d2e4525d8fb91eab69.tar.bz2 |
Migrating PPB_FileIO_Dev, PPB_FileRef_Dev, and PPB_FileSystem_Dev dependencies to PPB_FileIO, PPB_FileRef, and PPB_FileSystem.
Also fixed some lint errors.
Review URL: http://codereview.chromium.org/7248047
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@91733 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ppapi/tests')
-rw-r--r-- | ppapi/tests/all_c_includes.h | 10 | ||||
-rw-r--r-- | ppapi/tests/all_cpp_includes.h | 7 | ||||
-rw-r--r-- | ppapi/tests/test_directory_reader.cc | 22 |
3 files changed, 19 insertions, 20 deletions
diff --git a/ppapi/tests/all_c_includes.h b/ppapi/tests/all_c_includes.h index b5e702d..7b95220 100644 --- a/ppapi/tests/all_c_includes.h +++ b/ppapi/tests/all_c_includes.h @@ -10,7 +10,6 @@ #include "ppapi/c/dev/deprecated_bool.h" #include "ppapi/c/dev/pp_cursor_type_dev.h" -#include "ppapi/c/dev/pp_file_info_dev.h" #include "ppapi/c/dev/pp_graphics_3d_dev.h" #include "ppapi/c/dev/pp_video_dev.h" #include "ppapi/c/dev/ppb_buffer_dev.h" @@ -22,10 +21,6 @@ #include "ppapi/c/dev/ppb_cursor_control_dev.h" #include "ppapi/c/dev/ppb_directory_reader_dev.h" #include "ppapi/c/dev/ppb_file_chooser_dev.h" -#include "ppapi/c/dev/ppb_file_io_dev.h" -#include "ppapi/c/dev/ppb_file_io_trusted_dev.h" -#include "ppapi/c/dev/ppb_file_ref_dev.h" -#include "ppapi/c/dev/ppb_file_system_dev.h" #include "ppapi/c/dev/ppb_find_dev.h" #include "ppapi/c/dev/ppb_font_dev.h" #include "ppapi/c/dev/ppb_fullscreen_dev.h" @@ -53,9 +48,11 @@ #include "ppapi/c/dev/ppp_video_decoder_dev.h" #include "ppapi/c/dev/ppp_widget_dev.h" #include "ppapi/c/dev/ppp_zoom_dev.h" +#include "ppapi/c/trusted/ppb_file_io_trusted.h" #include "ppapi/c/pp_bool.h" #include "ppapi/c/pp_completion_callback.h" #include "ppapi/c/pp_errors.h" +#include "ppapi/c/pp_file_info.h" #include "ppapi/c/pp_input_event.h" #include "ppapi/c/pp_instance.h" #include "ppapi/c/pp_macros.h" @@ -71,6 +68,9 @@ #include "ppapi/c/ppb_audio.h" #include "ppapi/c/ppb_audio_config.h" #include "ppapi/c/ppb_core.h" +#include "ppapi/c/ppb_file_io.h" +#include "ppapi/c/ppb_file_ref.h" +#include "ppapi/c/ppb_file_system.h" #include "ppapi/c/ppb_graphics_2d.h" #include "ppapi/c/ppb_image_data.h" #include "ppapi/c/ppb_input_event.h" diff --git a/ppapi/tests/all_cpp_includes.h b/ppapi/tests/all_cpp_includes.h index 5c4b21d..8f730fc 100644 --- a/ppapi/tests/all_cpp_includes.h +++ b/ppapi/tests/all_cpp_includes.h @@ -18,9 +18,6 @@ #include "ppapi/cpp/dev/directory_entry_dev.h" #include "ppapi/cpp/dev/directory_reader_dev.h" #include "ppapi/cpp/dev/file_chooser_dev.h" -#include "ppapi/cpp/dev/file_io_dev.h" -#include "ppapi/cpp/dev/file_ref_dev.h" -#include "ppapi/cpp/dev/file_system_dev.h" #include "ppapi/cpp/dev/find_dev.h" #include "ppapi/cpp/dev/font_dev.h" #include "ppapi/cpp/dev/fullscreen_dev.h" @@ -38,6 +35,9 @@ #include "ppapi/cpp/dev/widget_client_dev.h" #include "ppapi/cpp/dev/widget_dev.h" #include "ppapi/cpp/dev/zoom_dev.h" +#include "ppapi/cpp/file_io.h" +#include "ppapi/cpp/file_ref.h" +#include "ppapi/cpp/file_system.h" #include "ppapi/cpp/graphics_2d.h" #include "ppapi/cpp/image_data.h" #include "ppapi/cpp/instance.h" @@ -58,4 +58,3 @@ #include "ppapi/cpp/var.h" #endif // PPAPI_TESTS_ALL_CPP_INCLUDES_H_ - diff --git a/ppapi/tests/test_directory_reader.cc b/ppapi/tests/test_directory_reader.cc index 874abcb..7a36501 100644 --- a/ppapi/tests/test_directory_reader.cc +++ b/ppapi/tests/test_directory_reader.cc @@ -12,9 +12,9 @@ #include "ppapi/c/dev/ppb_file_io_dev.h" #include "ppapi/cpp/dev/directory_entry_dev.h" #include "ppapi/cpp/dev/directory_reader_dev.h" -#include "ppapi/cpp/dev/file_io_dev.h" -#include "ppapi/cpp/dev/file_ref_dev.h" -#include "ppapi/cpp/dev/file_system_dev.h" +#include "ppapi/cpp/file_io.h" +#include "ppapi/cpp/file_ref.h" +#include "ppapi/cpp/file_system.h" #include "ppapi/cpp/instance.h" #include "ppapi/tests/test_utils.h" #include "ppapi/tests/testing_instance.h" @@ -29,7 +29,7 @@ std::string IntegerToString(int value) { return result; } -int32_t DeleteDirectoryRecursively(pp::FileRef_Dev* dir, +int32_t DeleteDirectoryRecursively(pp::FileRef* dir, TestCompletionCallback* callback) { if (!dir || !callback) return PP_ERROR_BADARGUMENT; @@ -50,7 +50,7 @@ int32_t DeleteDirectoryRecursively(pp::FileRef_Dev* dir, for (std::vector<pp::DirectoryEntry_Dev>::const_iterator it = entries.begin(); it != entries.end(); ++it) { - pp::FileRef_Dev file_ref = it->file_ref(); + pp::FileRef file_ref = it->file_ref(); if (it->file_type() == PP_FILETYPE_DIRECTORY) { rv = DeleteDirectoryRecursively(&file_ref, callback); if (rv != PP_OK && rv != PP_ERROR_FILENOTFOUND) @@ -81,7 +81,7 @@ void TestDirectoryReader::RunTest() { std::string TestDirectoryReader::TestGetNextFile() { TestCompletionCallback callback(instance_->pp_instance(), force_async_); - pp::FileSystem_Dev file_system( + pp::FileSystem file_system( instance_, PP_FILESYSTEMTYPE_LOCALTEMPORARY); int32_t rv = file_system.Open(1024, callback); if (force_async_ && rv != PP_OK_COMPLETIONPENDING) @@ -96,7 +96,7 @@ std::string TestDirectoryReader::TestGetNextFile() { const char* file_prefix = "file_"; const char* dir_prefix = "dir_"; - pp::FileRef_Dev test_dir(file_system, test_dir_name); + pp::FileRef test_dir(file_system, test_dir_name); rv = DeleteDirectoryRecursively(&test_dir, &callback); if (rv != PP_OK && rv != PP_ERROR_FILENOTFOUND) return ReportError("DeleteDirectoryRecursively", rv); @@ -113,9 +113,9 @@ std::string TestDirectoryReader::TestGetNextFile() { for (int i = 1; i < 4; ++i) { char buffer[40]; sprintf(buffer, "%s/%s%d", test_dir_name, file_prefix, i); - pp::FileRef_Dev file_ref(file_system, buffer); + pp::FileRef file_ref(file_system, buffer); - pp::FileIO_Dev file_io(instance_); + pp::FileIO file_io(instance_); rv = file_io.Open(file_ref, PP_FILEOPENFLAG_CREATE, callback); if (force_async_ && rv != PP_OK_COMPLETIONPENDING) return ReportError("FileIO::Open force_async", rv); @@ -131,7 +131,7 @@ std::string TestDirectoryReader::TestGetNextFile() { for (int i = 1; i < 4; ++i) { char buffer[40]; sprintf(buffer, "%s/%s%d", test_dir_name, dir_prefix, i); - pp::FileRef_Dev file_ref(file_system, buffer); + pp::FileRef file_ref(file_system, buffer); rv = file_ref.MakeDirectory(callback); if (force_async_ && rv != PP_OK_COMPLETIONPENDING) @@ -169,7 +169,7 @@ std::string TestDirectoryReader::TestGetNextFile() { for (std::vector<pp::DirectoryEntry_Dev>::const_iterator it = entries.begin(); it != entries.end(); ++it) { - pp::FileRef_Dev file_ref = it->file_ref(); + pp::FileRef file_ref = it->file_ref(); std::string file_path = file_ref.GetPath().AsString(); std::set<std::string>::iterator found = expected_file_names.find(file_path); |