| Index: ppapi/tests/test_file_io.cc
|
| diff --git a/ppapi/tests/test_file_io.cc b/ppapi/tests/test_file_io.cc
|
| index 50064192a43ca97e10d0031b01fe1b1327c10a6c..2d0da5c11994e95a7a43d6c8f2baadbfc8002174 100644
|
| --- a/ppapi/tests/test_file_io.cc
|
| +++ b/ppapi/tests/test_file_io.cc
|
| @@ -6,6 +6,7 @@
|
|
|
| #include <errno.h>
|
| #include <fcntl.h>
|
| +#include <stdio.h>
|
| #include <string.h>
|
| #include <sys/stat.h>
|
| #include <sys/types.h>
|
| @@ -414,6 +415,22 @@ std::string TestFileIO::TestReadWriteSetLength() {
|
| ASSERT_EQ(PP_OK, rv);
|
| ASSERT_EQ(std::string("testtest\0\0\0\0", 12), read_buffer);
|
|
|
| + // Append to the end of the file.
|
| + pp::FileIO file_io2(instance_);
|
| + callback.WaitForResult(file_io2.Open(file_ref,
|
| + PP_FILEOPENFLAG_CREATE |
|
| + PP_FILEOPENFLAG_READ |
|
| + PP_FILEOPENFLAG_APPEND,
|
| + callback.GetCallback()));
|
| + rv = WriteEntireBuffer(instance_->pp_instance(), &file_io2, 0, "appended",
|
| + callback_type());
|
| + ASSERT_EQ(PP_OK, rv);
|
| + read_buffer.clear();
|
| + rv = ReadEntireFile(instance_->pp_instance(), &file_io2, 0, &read_buffer,
|
| + callback_type());
|
| + ASSERT_EQ(PP_OK, rv);
|
| + ASSERT_EQ(std::string("testtesttest\0\0\0\0appended", 24), read_buffer);
|
| +
|
| PASS();
|
| }
|
|
|
|
|