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

Side by Side Diff: ppapi/tests/test_file_io.cc

Issue 8477015: Make it possible to enable/disable specific ppapi tests. Migrate PostMessage tests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix license headers. 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ppapi/tests/test_file_io.h ('k') | ppapi/tests/test_file_ref.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ppapi/tests/test_file_io.h" 5 #include "ppapi/tests/test_file_io.h"
6 6
7 #include <string.h> 7 #include <string.h>
8 8
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "ppapi/c/dev/ppb_testing_dev.h" 10 #include "ppapi/c/dev/ppb_testing_dev.h"
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 104
105 return PP_OK; 105 return PP_OK;
106 } 106 }
107 107
108 } // namespace 108 } // namespace
109 109
110 bool TestFileIO::Init() { 110 bool TestFileIO::Init() {
111 return InitTestingInterface() && EnsureRunningOverHTTP(); 111 return InitTestingInterface() && EnsureRunningOverHTTP();
112 } 112 }
113 113
114 void TestFileIO::RunTest() { 114 void TestFileIO::RunTests(const std::string& filter) {
115 RUN_TEST_FORCEASYNC_AND_NOT(Open); 115 RUN_TEST_FORCEASYNC_AND_NOT(Open, filter);
116 RUN_TEST_FORCEASYNC_AND_NOT(ReadWriteSetLength); 116 RUN_TEST_FORCEASYNC_AND_NOT(ReadWriteSetLength, filter);
117 RUN_TEST_FORCEASYNC_AND_NOT(TouchQuery); 117 RUN_TEST_FORCEASYNC_AND_NOT(TouchQuery, filter);
118 RUN_TEST_FORCEASYNC_AND_NOT(AbortCalls); 118 RUN_TEST_FORCEASYNC_AND_NOT(AbortCalls, filter);
119 RUN_TEST_FORCEASYNC_AND_NOT(ParallelReads); 119 RUN_TEST_FORCEASYNC_AND_NOT(ParallelReads, filter);
120 RUN_TEST_FORCEASYNC_AND_NOT(ParallelWrites); 120 RUN_TEST_FORCEASYNC_AND_NOT(ParallelWrites, filter);
121 RUN_TEST_FORCEASYNC_AND_NOT(NotAllowMixedReadWrite); 121 RUN_TEST_FORCEASYNC_AND_NOT(NotAllowMixedReadWrite, filter);
122 RUN_TEST_FORCEASYNC_AND_NOT(WillWriteWillSetLength); 122 RUN_TEST_FORCEASYNC_AND_NOT(WillWriteWillSetLength, filter);
123 123
124 // TODO(viettrungluu): add tests: 124 // TODO(viettrungluu): add tests:
125 // - that PP_ERROR_PENDING is correctly returned 125 // - that PP_ERROR_PENDING is correctly returned
126 // - that operations respect the file open modes (flags) 126 // - that operations respect the file open modes (flags)
127 } 127 }
128 128
129 std::string TestFileIO::TestOpen() { 129 std::string TestFileIO::TestOpen() {
130 TestCompletionCallback callback(instance_->pp_instance(), force_async_); 130 TestCompletionCallback callback(instance_->pp_instance(), force_async_);
131 131
132 pp::FileSystem file_system(instance_, PP_FILESYSTEMTYPE_LOCALTEMPORARY); 132 pp::FileSystem file_system(instance_, PP_FILESYSTEMTYPE_LOCALTEMPORARY);
(...skipping 958 matching lines...) Expand 10 before | Expand all | Expand 10 after
1091 rv = callback.WaitForResult(); 1091 rv = callback.WaitForResult();
1092 if ((invalid_combination && rv == PP_OK) || 1092 if ((invalid_combination && rv == PP_OK) ||
1093 (!invalid_combination && ((rv == PP_OK) != create_if_doesnt_exist))) { 1093 (!invalid_combination && ((rv == PP_OK) != create_if_doesnt_exist))) {
1094 return ReportOpenError(open_flags); 1094 return ReportOpenError(open_flags);
1095 } 1095 }
1096 1096
1097 return std::string(); 1097 return std::string();
1098 } 1098 }
1099 1099
1100 // TODO(viettrungluu): Test Close(). crbug.com/69457 1100 // TODO(viettrungluu): Test Close(). crbug.com/69457
OLDNEW
« no previous file with comments | « ppapi/tests/test_file_io.h ('k') | ppapi/tests/test_file_ref.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698