diff options
author | teravest@chromium.org <teravest@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-10-10 17:20:38 +0000 |
---|---|---|
committer | teravest@chromium.org <teravest@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-10-10 17:20:38 +0000 |
commit | 852bc307c5e5ce3c5ef04d49a2d94add0f1aeab7 (patch) | |
tree | 8688f5da3ca6a1ee1c36b52405f55fe6f5b15eb2 /ppapi/tests | |
parent | a6f979f7c40616bfa4b188cdbd7dd5be628bbdc8 (diff) | |
download | chromium_src-852bc307c5e5ce3c5ef04d49a2d94add0f1aeab7.zip chromium_src-852bc307c5e5ce3c5ef04d49a2d94add0f1aeab7.tar.gz chromium_src-852bc307c5e5ce3c5ef04d49a2d94add0f1aeab7.tar.bz2 |
Pepper: Remove PPB_FileIOTrusted.
After migrating FileDownloader to PPB_FileIO_Private, there should be no users of PPB_FileIOTrusted remaining.
This removes a use of the GetOSFileDescriptor method in the URLLoader tests. I had tried moving this over to RequestOSFileHandle, but repeatedly ran into quota problems (maybe with how the test is set up?). Regardless, I don't think we need coverage there since that's tested in the FileIO tests anyway.
R=dmichael@chromium.org, sbc@chromium.org
TBR=cpu, jschuh, sbc
BUG=246396
Review URL: https://codereview.chromium.org/26473004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@227952 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ppapi/tests')
-rw-r--r-- | ppapi/tests/all_c_includes.h | 1 | ||||
-rw-r--r-- | ppapi/tests/test_file_io.cc | 1 | ||||
-rw-r--r-- | ppapi/tests/test_url_loader.cc | 23 | ||||
-rw-r--r-- | ppapi/tests/test_url_loader.h | 4 |
4 files changed, 8 insertions, 21 deletions
diff --git a/ppapi/tests/all_c_includes.h b/ppapi/tests/all_c_includes.h index be825ac..76f9396 100644 --- a/ppapi/tests/all_c_includes.h +++ b/ppapi/tests/all_c_includes.h @@ -129,7 +129,6 @@ #include "ppapi/c/private/ppb_x509_certificate_private.h" #include "ppapi/c/private/ppp_content_decryptor_private.h" #include "ppapi/c/private/ppp_instance_private.h" -#include "ppapi/c/trusted/ppb_file_io_trusted.h" #include "ppapi/c/trusted/ppb_url_loader_trusted.h" #endif /* PPAPI_TESTS_ALL_C_INCLUDES_H_ */ diff --git a/ppapi/tests/test_file_io.cc b/ppapi/tests/test_file_io.cc index 6711663..9b0bc27 100644 --- a/ppapi/tests/test_file_io.cc +++ b/ppapi/tests/test_file_io.cc @@ -17,7 +17,6 @@ #include "ppapi/c/pp_errors.h" #include "ppapi/c/ppb_file_io.h" #include "ppapi/c/private/pp_file_handle.h" -#include "ppapi/c/trusted/ppb_file_io_trusted.h" #include "ppapi/cpp/file_io.h" #include "ppapi/cpp/file_ref.h" #include "ppapi/cpp/file_system.h" diff --git a/ppapi/tests/test_url_loader.cc b/ppapi/tests/test_url_loader.cc index 8d13f40..c268eb0 100644 --- a/ppapi/tests/test_url_loader.cc +++ b/ppapi/tests/test_url_loader.cc @@ -12,7 +12,6 @@ #include "ppapi/c/pp_errors.h" #include "ppapi/c/ppb_file_io.h" #include "ppapi/c/ppb_url_loader.h" -#include "ppapi/c/trusted/ppb_file_io_trusted.h" #include "ppapi/c/trusted/ppb_url_loader_trusted.h" #include "ppapi/cpp/dev/url_util_dev.h" #include "ppapi/cpp/file_io.h" @@ -20,6 +19,7 @@ #include "ppapi/cpp/file_system.h" #include "ppapi/cpp/instance.h" #include "ppapi/cpp/module.h" +#include "ppapi/cpp/private/file_io_private.h" #include "ppapi/cpp/url_loader.h" #include "ppapi/cpp/url_request_info.h" #include "ppapi/cpp/url_response_info.h" @@ -59,7 +59,7 @@ int32_t WriteEntireBuffer(PP_Instance instance, TestURLLoader::TestURLLoader(TestingInstance* instance) : TestCase(instance), - file_io_trusted_interface_(NULL), + file_io_private_interface_(NULL), url_loader_trusted_interface_(NULL) { } @@ -74,20 +74,18 @@ bool TestURLLoader::Init() { if (!file_io_interface) instance_->AppendError("FileIO interface not available"); - file_io_trusted_interface_ = static_cast<const PPB_FileIOTrusted*>( - pp::Module::Get()->GetBrowserInterface(PPB_FILEIOTRUSTED_INTERFACE)); + file_io_private_interface_ = static_cast<const PPB_FileIO_Private*>( + pp::Module::Get()->GetBrowserInterface(PPB_FILEIO_PRIVATE_INTERFACE)); + if (!file_io_private_interface_) + instance_->AppendError("FileIO_Private interface not available"); url_loader_trusted_interface_ = static_cast<const PPB_URLLoaderTrusted*>( pp::Module::Get()->GetBrowserInterface(PPB_URLLOADERTRUSTED_INTERFACE)); if (!testing_interface_->IsOutOfProcess()) { // Trusted interfaces are not supported under NaCl. #if !(defined __native_client__) - if (!file_io_trusted_interface_) - instance_->AppendError("FileIOTrusted interface not available"); if (!url_loader_trusted_interface_) instance_->AppendError("URLLoaderTrusted interface not available"); #else - if (file_io_trusted_interface_) - instance_->AppendError("FileIOTrusted interface is supported by NaCl"); if (url_loader_trusted_interface_) instance_->AppendError("URLLoaderTrusted interface is supported by NaCl"); #endif @@ -490,15 +488,6 @@ std::string TestURLLoader::TestStreamToFile() { if (data != expected_body) return "ReadEntireFile returned unexpected content"; - // FileIOTrusted is not supported by NaCl or ppapi/proxy. - if (!testing_interface_->IsOutOfProcess()) { -#if !(defined __native_client__) - int32_t file_descriptor = file_io_trusted_interface_->GetOSFileDescriptor( - reader.pp_resource()); - if (file_descriptor < 0) - return "FileIO::GetOSFileDescriptor() returned a bad file descriptor."; -#endif - } PASS(); } diff --git a/ppapi/tests/test_url_loader.h b/ppapi/tests/test_url_loader.h index 95c97b1..3e49ce9 100644 --- a/ppapi/tests/test_url_loader.h +++ b/ppapi/tests/test_url_loader.h @@ -7,7 +7,7 @@ #include <string> -#include "ppapi/c/trusted/ppb_file_io_trusted.h" +#include "ppapi/c/private/ppb_file_io_private.h" #include "ppapi/c/trusted/ppb_url_loader_trusted.h" #include "ppapi/tests/test_case.h" @@ -73,7 +73,7 @@ class TestURLLoader : public TestCase { std::string TestUntendedLoad(); std::string TestPrefetchBufferThreshold(); - const PPB_FileIOTrusted* file_io_trusted_interface_; + const PPB_FileIO_Private* file_io_private_interface_; const PPB_URLLoaderTrusted* url_loader_trusted_interface_; }; |