Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(10292)

Unified Diff: chrome/browser/image_writer/image_writer_test_utils.h

Issue 61643015: Adds imageWriterPrivate support for Windows (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Reorganization and test updates. Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/image_writer/image_writer_test_utils.h
diff --git a/chrome/browser/image_writer/image_writer_test_utils.h b/chrome/browser/image_writer/image_writer_test_utils.h
new file mode 100644
index 0000000000000000000000000000000000000000..e54276089ba3ac6eacb2baa4d82969ec9bca6d7f
--- /dev/null
+++ b/chrome/browser/image_writer/image_writer_test_utils.h
@@ -0,0 +1,36 @@
+// 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 CHROME_BROWSER_IMAGE_WRITER_IMAGE_WRITER_TEST_UTILS_H_
+#define CHROME_BROWSER_IMAGE_WRITER_IMAGE_WRITER_TEST_UTILS_H_
+
+#include "base/files/file_path.h"
+#include "base/files/scoped_temp_dir.h"
+
+namespace image_writer {
+
+extern const int kTestFileSize;
+extern const char kTestBytePattern;
+
+class TempFilesForTesting {
+ public:
+ bool SetUp();
+
+ base::FilePath ImagePath();
+ base::FilePath DevicePath();
+
+ bool InitializeImage();
+ bool InitializeFile(const base::FilePath& path, int length, char pattern);
+
+ bool CompareImageAndDevice();
+
+ private:
+ base::FilePath image_path_;
+ base::FilePath device_path_;
+ base::ScopedTempDir temp_dir_;
+};
+
+} // namespace image_writer
+
+#endif // CHROME_BROWSER_IMAGE_WRITER_IMAGE_WRITER_TEST_UTILS_H_

Powered by Google App Engine
This is Rietveld 408576698