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

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

Issue 6432001: Implement proxy for FlashMenu and Run/QuitMessageLoop (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Handle NULL menus more gracefully Created 9 years, 10 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ppapi/proxy/serialized_flash_menu.cc ('k') | ppapi/tests/test_file_io.cc » ('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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 22 matching lines...) Expand all
33 33
34 bool TestDirectoryReader::Init() { 34 bool TestDirectoryReader::Init() {
35 return InitTestingInterface() && EnsureRunningOverHTTP(); 35 return InitTestingInterface() && EnsureRunningOverHTTP();
36 } 36 }
37 37
38 void TestDirectoryReader::RunTest() { 38 void TestDirectoryReader::RunTest() {
39 RUN_TEST(GetNextFile); 39 RUN_TEST(GetNextFile);
40 } 40 }
41 41
42 std::string TestDirectoryReader::TestGetNextFile() { 42 std::string TestDirectoryReader::TestGetNextFile() {
43 TestCompletionCallback callback; 43 TestCompletionCallback callback(instance_->pp_instance());
44 pp::FileSystem_Dev file_system( 44 pp::FileSystem_Dev file_system(
45 instance_, PP_FILESYSTEMTYPE_LOCALTEMPORARY); 45 instance_, PP_FILESYSTEMTYPE_LOCALTEMPORARY);
46 int32_t rv = file_system.Open(1024, callback); 46 int32_t rv = file_system.Open(1024, callback);
47 if (rv == PP_ERROR_WOULDBLOCK) 47 if (rv == PP_ERROR_WOULDBLOCK)
48 rv = callback.WaitForResult(); 48 rv = callback.WaitForResult();
49 if (rv != PP_OK) 49 if (rv != PP_OK)
50 return ReportError("FileSystem::Open", rv); 50 return ReportError("FileSystem::Open", rv);
51 51
52 pp::FileRef_Dev dir_ref(file_system, "/"); 52 pp::FileRef_Dev dir_ref(file_system, "/");
53 pp::FileRef_Dev file_ref_1(file_system, "/file_1"); 53 pp::FileRef_Dev file_ref_1(file_system, "/file_1");
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 return "DirectoryReader::GetNextEntry not aborted."; 166 return "DirectoryReader::GetNextEntry not aborted.";
167 if (entry.is_null() != entry_is_null) 167 if (entry.is_null() != entry_is_null)
168 return "DirectoryReader::GetNextEntry wrote result after destruction."; 168 return "DirectoryReader::GetNextEntry wrote result after destruction.";
169 } else if (rv != PP_OK) { 169 } else if (rv != PP_OK) {
170 return ReportError("DirectoryReader::GetNextEntry", rv); 170 return ReportError("DirectoryReader::GetNextEntry", rv);
171 } 171 }
172 } 172 }
173 173
174 return ""; 174 return "";
175 } 175 }
OLDNEW
« no previous file with comments | « ppapi/proxy/serialized_flash_menu.cc ('k') | ppapi/tests/test_file_io.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698