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_directory_reader.h" | 5 #include "ppapi/tests/test_directory_reader.h" |
6 | 6 |
7 #include <stdio.h> | 7 #include <stdio.h> |
8 #include <set> | 8 #include <set> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
65 } | 65 } |
66 rv = dir->Delete(*callback); | 66 rv = dir->Delete(*callback); |
67 if (rv == PP_OK_COMPLETIONPENDING) | 67 if (rv == PP_OK_COMPLETIONPENDING) |
68 rv = callback->WaitForResult(); | 68 rv = callback->WaitForResult(); |
69 return rv; | 69 return rv; |
70 } | 70 } |
71 | 71 |
72 } // namespace | 72 } // namespace |
73 | 73 |
74 bool TestDirectoryReader::Init() { | 74 bool TestDirectoryReader::Init() { |
75 return InitTestingInterface() && EnsureRunningOverHTTP(); | 75 return CheckTestingInterface() && EnsureRunningOverHTTP(); |
76 } | 76 } |
77 | 77 |
78 void TestDirectoryReader::RunTests(const std::string& filter) { | 78 void TestDirectoryReader::RunTests(const std::string& filter) { |
79 RUN_TEST(GetNextFile, filter); | 79 RUN_TEST(GetNextFile, filter); |
80 } | 80 } |
81 | 81 |
82 std::string TestDirectoryReader::TestGetNextFile() { | 82 std::string TestDirectoryReader::TestGetNextFile() { |
83 TestCompletionCallback callback(instance_->pp_instance(), force_async_); | 83 TestCompletionCallback callback(instance_->pp_instance(), force_async_); |
84 pp::FileSystem file_system( | 84 pp::FileSystem file_system( |
85 instance_, PP_FILESYSTEMTYPE_LOCALTEMPORARY); | 85 instance_, PP_FILESYSTEMTYPE_LOCALTEMPORARY); |
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
216 return "DirectoryReader::GetNextEntry not aborted."; | 216 return "DirectoryReader::GetNextEntry not aborted."; |
217 if (entry.is_null() != entry_is_null) | 217 if (entry.is_null() != entry_is_null) |
218 return "DirectoryReader::GetNextEntry wrote result after destruction."; | 218 return "DirectoryReader::GetNextEntry wrote result after destruction."; |
219 } else if (rv != PP_OK) { | 219 } else if (rv != PP_OK) { |
220 return ReportError("DirectoryReader::GetNextEntry", rv); | 220 return ReportError("DirectoryReader::GetNextEntry", rv); |
221 } | 221 } |
222 } | 222 } |
223 | 223 |
224 PASS(); | 224 PASS(); |
225 } | 225 } |
OLD | NEW |