Index: ppapi/tests/test_file_io.cc |
diff --git a/ppapi/tests/test_file_io.cc b/ppapi/tests/test_file_io.cc |
index 2d0da5c11994e95a7a43d6c8f2baadbfc8002174..ed2183b669afc6f4906f78d0376ce41de498d5d8 100644 |
--- a/ppapi/tests/test_file_io.cc |
+++ b/ppapi/tests/test_file_io.cc |
@@ -1138,6 +1138,10 @@ std::string TestFileIO::TestRequestOSFileHandleWithOpenExclusive() { |
callback.WaitForResult(file_system.Open(1024, callback.GetCallback())); |
ASSERT_EQ(PP_OK, callback.result()); |
+ // Open with PP_FILEOPENFLAG_CREATE and PP_FILEOPENFLAG_EXCLUSIVE will fail |
+ // if the file already exists. Delete it here to make sure it does not. |
+ callback.WaitForResult(file_ref.Delete(callback.GetCallback())); |
+ |
pp::FileIO_Private file_io(instance_); |
callback.WaitForResult(file_io.Open(file_ref, |
PP_FILEOPENFLAG_CREATE | |