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

Unified Diff: ppapi/tests/test_file_io.cc

Issue 21833005: Fix PPAPI TestCase so individual tests can be run more than once. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Robustify. Created 7 years, 4 months 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
« no previous file with comments | « ppapi/tests/test_case.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 |
« no previous file with comments | « ppapi/tests/test_case.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698