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(yzshen): Add more test cases for PPB_Flash_File_ModuleLocal and | 22 // TODO(raymes): We should have SetUp/TearDown methods for ppapi tests. |
23 // PPB_Flash_File_FileRef. | 23 void SetUp(); |
| 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(); |
24 std::string TestCreateTemporaryFile(); | 31 std::string TestCreateTemporaryFile(); |
25 | 32 |
| 33 // TODO(raymes): Add these when we can test file chooser properly. |
| 34 // std::string TestOpenFileRef(); |
| 35 // std::string TestQueryFileRef(); |
| 36 |
26 // Gets the number of files and directories under the module-local root | 37 // Gets the number of files and directories under the module-local root |
27 // directory. | 38 // directory. |
28 std::string GetItemCountUnderModuleLocalRoot(size_t* item_count); | 39 std::string GetItemCountUnderModuleLocalRoot(size_t* item_count); |
29 }; | 40 }; |
30 | 41 |
31 #endif // PPAPI_TESTS_TEST_FLASH_FILE_H_ | 42 #endif // PPAPI_TESTS_TEST_FLASH_FILE_H_ |
OLD | NEW |