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

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

Issue 8536031: Reland http://codereview.chromium.org/8477015 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merge AGAIN 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_directory_reader.h ('k') | ppapi/tests/test_file_io.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_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 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 InitTestingInterface() && EnsureRunningOverHTTP();
76 } 76 }
77 77
78 void TestDirectoryReader::RunTest() { 78 void TestDirectoryReader::RunTests(const std::string& filter) {
79 RUN_TEST(GetNextFile); 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);
86 int32_t rv = file_system.Open(1024, callback); 86 int32_t rv = file_system.Open(1024, callback);
87 if (force_async_ && rv != PP_OK_COMPLETIONPENDING) 87 if (force_async_ && rv != PP_OK_COMPLETIONPENDING)
88 return ReportError("FileSystem::Open force_async", rv); 88 return ReportError("FileSystem::Open force_async", rv);
89 if (rv == PP_OK_COMPLETIONPENDING) 89 if (rv == PP_OK_COMPLETIONPENDING)
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 }
OLDNEW
« no previous file with comments | « ppapi/tests/test_directory_reader.h ('k') | ppapi/tests/test_file_io.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698