summaryrefslogtreecommitdiffstats
path: root/webkit/fileapi/test_file_set.h
blob: 6823c6d1f9c7f6a672d36045cf09c6cff541d1d4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef WEBKIT_FILEAPI_TEST_FILE_SET_H_
#define WEBKIT_FILEAPI_TEST_FILE_SET_H_

#include <set>

#include "base/file_path.h"

// Common test data structures and test cases.

namespace fileapi {

class FileSystemFileUtil;

namespace test {

struct TestCaseRecord {
  bool is_directory;
  const base::FilePath::CharType path[64];
  int64 data_file_size;
};

extern const TestCaseRecord kRegularTestCases[];
extern const size_t kRegularTestCaseSize;

size_t GetRegularTestCaseSize();

// Creates one file or directory specified by |record|.
void SetUpOneTestCase(const base::FilePath& root_path, const TestCaseRecord& record);

// Creates the files and directories specified in kRegularTestCases.
void SetUpRegularTestCases(const base::FilePath& root_path);

}  // namespace test

}  // namespace fileapi

#endif  // WEBKIT_FILEAPI_TEST_FILE_SET_H_