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

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

Issue 14784002: Move DirectoryReader::ReadEntries to FileRef::ReadDirectoryEntries (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: address dmichael's comments Created 7 years, 7 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_system.h" 5 #include "ppapi/tests/test_file_system.h"
6 6
7 #include <string.h> 7 #include <string.h>
8 8
9 #include "ppapi/c/pp_errors.h" 9 #include "ppapi/c/pp_errors.h"
10 #include "ppapi/cpp/file_system.h" 10 #include "ppapi/cpp/file_system.h"
(...skipping 13 matching lines...) Expand all
24 24
25 std::string TestFileSystem::TestOpen() { 25 std::string TestFileSystem::TestOpen() {
26 TestCompletionCallback callback(instance_->pp_instance(), callback_type()); 26 TestCompletionCallback callback(instance_->pp_instance(), callback_type());
27 27
28 // Open. 28 // Open.
29 pp::FileSystem file_system(instance_, PP_FILESYSTEMTYPE_LOCALTEMPORARY); 29 pp::FileSystem file_system(instance_, PP_FILESYSTEMTYPE_LOCALTEMPORARY);
30 callback.WaitForResult(file_system.Open(1024, callback.GetCallback())); 30 callback.WaitForResult(file_system.Open(1024, callback.GetCallback()));
31 CHECK_CALLBACK_BEHAVIOR(callback); 31 CHECK_CALLBACK_BEHAVIOR(callback);
32 ASSERT_EQ(PP_OK, callback.result()); 32 ASSERT_EQ(PP_OK, callback.result());
33 33
34 // Open aborted (see the DirectoryReader test for comments). 34 // Open aborted.
35 int32_t rv = 0; 35 int32_t rv = 0;
36 { 36 {
37 pp::FileSystem fs(instance_, PP_FILESYSTEMTYPE_LOCALTEMPORARY); 37 pp::FileSystem fs(instance_, PP_FILESYSTEMTYPE_LOCALTEMPORARY);
38 rv = fs.Open(1024, callback.GetCallback()); 38 rv = fs.Open(1024, callback.GetCallback());
39 } 39 }
40 callback.WaitForAbortResult(rv); 40 callback.WaitForAbortResult(rv);
41 CHECK_CALLBACK_BEHAVIOR(callback); 41 CHECK_CALLBACK_BEHAVIOR(callback);
42 42
43 PASS(); 43 PASS();
44 } 44 }
(...skipping 15 matching lines...) Expand all
60 CHECK_CALLBACK_BEHAVIOR(callback_1); 60 CHECK_CALLBACK_BEHAVIOR(callback_1);
61 ASSERT_EQ(PP_OK, callback_1.result()); 61 ASSERT_EQ(PP_OK, callback_1.result());
62 62
63 TestCompletionCallback callback_3(instance_->pp_instance(), callback_type()); 63 TestCompletionCallback callback_3(instance_->pp_instance(), callback_type());
64 callback_3.WaitForResult(file_system.Open(1024, callback_3.GetCallback())); 64 callback_3.WaitForResult(file_system.Open(1024, callback_3.GetCallback()));
65 CHECK_CALLBACK_BEHAVIOR(callback_3); 65 CHECK_CALLBACK_BEHAVIOR(callback_3);
66 ASSERT_NE(PP_OK, callback_3.result()); 66 ASSERT_NE(PP_OK, callback_3.result());
67 67
68 PASS(); 68 PASS();
69 } 69 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698