OLD | NEW |
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 #ifndef PAPPI_TESTS_TEST_FLASH_FILE_H_ | 5 #ifndef PAPPI_TESTS_TEST_FLASH_FILE_H_ |
6 #define PPAPI_TESTS_TEST_FLASH_FILE_H_ | 6 #define PPAPI_TESTS_TEST_FLASH_FILE_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "ppapi/tests/test_case.h" | 10 #include "ppapi/tests/test_case.h" |
11 | 11 |
12 class TestFlashFile: public TestCase { | 12 class TestFlashFile: public TestCase { |
13 public: | 13 public: |
14 explicit TestFlashFile(TestingInstance* instance); | 14 explicit TestFlashFile(TestingInstance* instance); |
15 virtual ~TestFlashFile(); | 15 virtual ~TestFlashFile(); |
16 | 16 |
17 // TestCase implementation. | 17 // TestCase implementation. |
18 virtual bool Init(); | 18 virtual bool Init(); |
19 virtual void RunTests(const std::string& filter); | 19 virtual void RunTests(const std::string& filter); |
20 | 20 |
21 private: | 21 private: |
22 // TODO(raymes): We should have SetUp/TearDown methods for ppapi tests. | 22 // TODO(yzshen): Add more test cases for PPB_Flash_File_ModuleLocal and |
23 void SetUp(); | 23 // PPB_Flash_File_FileRef. |
24 | |
25 std::string TestOpenFile(); | |
26 std::string TestRenameFile(); | |
27 std::string TestDeleteFileOrDir(); | |
28 std::string TestCreateDir(); | |
29 std::string TestQueryFile(); | |
30 std::string TestGetDirContents(); | |
31 std::string TestCreateTemporaryFile(); | 24 std::string TestCreateTemporaryFile(); |
32 | 25 |
33 // TODO(raymes): Add these when we can test file chooser properly. | |
34 // std::string TestOpenFileRef(); | |
35 // std::string TestQueryFileRef(); | |
36 | |
37 // Gets the number of files and directories under the module-local root | 26 // Gets the number of files and directories under the module-local root |
38 // directory. | 27 // directory. |
39 std::string GetItemCountUnderModuleLocalRoot(size_t* item_count); | 28 std::string GetItemCountUnderModuleLocalRoot(size_t* item_count); |
40 }; | 29 }; |
41 | 30 |
42 #endif // PPAPI_TESTS_TEST_FLASH_FILE_H_ | 31 #endif // PPAPI_TESTS_TEST_FLASH_FILE_H_ |
OLD | NEW |