OLD | NEW |
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 <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
102 return PP_ERROR_FAILED; | 102 return PP_ERROR_FAILED; |
103 write_offset += rv; | 103 write_offset += rv; |
104 } | 104 } |
105 | 105 |
106 return PP_OK; | 106 return PP_OK; |
107 } | 107 } |
108 | 108 |
109 } // namespace | 109 } // namespace |
110 | 110 |
111 bool TestFileIO::Init() { | 111 bool TestFileIO::Init() { |
112 return InitTestingInterface() && EnsureRunningOverHTTP(); | 112 return CheckTestingInterface() && EnsureRunningOverHTTP(); |
113 } | 113 } |
114 | 114 |
115 void TestFileIO::RunTests(const std::string& filter) { | 115 void TestFileIO::RunTests(const std::string& filter) { |
116 RUN_TEST_FORCEASYNC_AND_NOT(Open, filter); | 116 RUN_TEST_FORCEASYNC_AND_NOT(Open, filter); |
117 RUN_TEST_FORCEASYNC_AND_NOT(ReadWriteSetLength, filter); | 117 RUN_TEST_FORCEASYNC_AND_NOT(ReadWriteSetLength, filter); |
118 RUN_TEST_FORCEASYNC_AND_NOT(TouchQuery, filter); | 118 RUN_TEST_FORCEASYNC_AND_NOT(TouchQuery, filter); |
119 RUN_TEST_FORCEASYNC_AND_NOT(AbortCalls, filter); | 119 RUN_TEST_FORCEASYNC_AND_NOT(AbortCalls, filter); |
120 RUN_TEST_FORCEASYNC_AND_NOT(ParallelReads, filter); | 120 RUN_TEST_FORCEASYNC_AND_NOT(ParallelReads, filter); |
121 RUN_TEST_FORCEASYNC_AND_NOT(ParallelWrites, filter); | 121 RUN_TEST_FORCEASYNC_AND_NOT(ParallelWrites, filter); |
122 RUN_TEST_FORCEASYNC_AND_NOT(NotAllowMixedReadWrite, filter); | 122 RUN_TEST_FORCEASYNC_AND_NOT(NotAllowMixedReadWrite, filter); |
(...skipping 996 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1119 rv = callback.WaitForResult(); | 1119 rv = callback.WaitForResult(); |
1120 if ((invalid_combination && rv == PP_OK) || | 1120 if ((invalid_combination && rv == PP_OK) || |
1121 (!invalid_combination && ((rv == PP_OK) != create_if_doesnt_exist))) { | 1121 (!invalid_combination && ((rv == PP_OK) != create_if_doesnt_exist))) { |
1122 return ReportOpenError(open_flags); | 1122 return ReportOpenError(open_flags); |
1123 } | 1123 } |
1124 | 1124 |
1125 return std::string(); | 1125 return std::string(); |
1126 } | 1126 } |
1127 | 1127 |
1128 // TODO(viettrungluu): Test Close(). crbug.com/69457 | 1128 // TODO(viettrungluu): Test Close(). crbug.com/69457 |
OLD | NEW |