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_BROWSER_IMAGE_WRITER_IMAGE_WRITER_TEST_UTILS_H_ |
| 6 #define CHROME_BROWSER_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 image_writer { |
| 12 |
| 13 extern const int kTestFileSize; |
| 14 extern const char kTestBytePattern; |
| 15 |
| 16 class TempFilesForTesting { |
| 17 public: |
| 18 bool SetUp(); |
| 19 |
| 20 base::FilePath ImagePath(); |
| 21 base::FilePath DevicePath(); |
| 22 |
| 23 bool InitializeImage(); |
| 24 bool InitializeFile(const base::FilePath& path, int length, char pattern); |
| 25 |
| 26 bool CompareImageAndDevice(); |
| 27 |
| 28 private: |
| 29 base::FilePath image_path_; |
| 30 base::FilePath device_path_; |
| 31 base::ScopedTempDir temp_dir_; |
| 32 }; |
| 33 |
| 34 } // namespace image_writer |
| 35 |
| 36 #endif // CHROME_BROWSER_IMAGE_WRITER_IMAGE_WRITER_TEST_UTILS_H_ |
OLD | NEW |