OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CHROME_UTILITY_IMAGE_WRITER_IMAGE_WRITER_TEST_UTILS_H_ |
| 6 #define CHROME_UTILITY_IMAGE_WRITER_IMAGE_WRITER_TEST_UTILS_H_ |
| 7 |
| 8 #include "base/files/file_path.h" |
| 9 #include "base/files/scoped_temp_dir.h" |
| 10 |
| 11 namespace chrome { |
| 12 namespace image_writer { |
| 13 |
| 14 extern const int kTestFileSize; |
| 15 extern const char kTestBytePattern; |
| 16 |
| 17 class TempFilesForTesting { |
| 18 public: |
| 19 bool SetUp(); |
| 20 |
| 21 base::FilePath ImagePath(); |
| 22 base::FilePath DevicePath(); |
| 23 |
| 24 bool InitializeImage(); |
| 25 bool InitializeFile(const base::FilePath& path, int length, char pattern); |
| 26 |
| 27 bool CompareImageAndDevice(); |
| 28 |
| 29 private: |
| 30 base::FilePath image_path_; |
| 31 base::FilePath device_path_; |
| 32 base::ScopedTempDir temp_dir_; |
| 33 }; |
| 34 |
| 35 } // namespace image_writer |
| 36 } // namespace chrome |
| 37 |
| 38 #endif // CHROME_UTILITY_IMAGE_WRITER_IMAGE_WRITER_TEST_UTILS_H_ |
OLD | NEW |