Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(199)

Unified Diff: ppapi/tests/test_file_io.cc

Issue 8764003: Implement a proxy for Pepper FileIO. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: ppapi/tests/test_file_io.cc
diff --git a/ppapi/tests/test_file_io.cc b/ppapi/tests/test_file_io.cc
index 79995ff083edaae91e48ccd150a7b90523039713..788212b7277c8dead2fbc3c157d68aac3b0680f8 100644
--- a/ppapi/tests/test_file_io.cc
+++ b/ppapi/tests/test_file_io.cc
@@ -941,10 +941,14 @@ std::string TestFileIO::TestWillWriteWillSetLength() {
if (!trusted)
return ReportError("FileIOTrusted", PP_ERROR_FAILED);
- // Get file descriptor.
- int32_t fd = trusted->GetOSFileDescriptor(file_io.pp_resource());
- if (fd < 0)
- return "FileIO::GetOSFileDescriptor() returned a bad file descriptor.";
+ // Get file descriptor. This is only supported in-process for now, so don't
+ // test out of process.
+ const PPB_Testing_Dev* testing_interface = GetTestingInterface();
+ if (testing_interface && !testing_interface->IsOutOfProcess()) {
+ int32_t fd = trusted->GetOSFileDescriptor(file_io.pp_resource());
+ if (fd < 0)
+ return "FileIO::GetOSFileDescriptor() returned a bad file descriptor.";
+ }
// Calling WillWrite.
rv = trusted->WillWrite(

Powered by Google App Engine
This is Rietveld 408576698