Index: chrome/browser/extensions/api/image_writer_private/test_utils.h |
diff --git a/chrome/browser/extensions/api/image_writer_private/test_utils.h b/chrome/browser/extensions/api/image_writer_private/test_utils.h |
index b290e881ee87e86dd7096e3d1bfb981b5d9c5517..88ccf492b4e8f9caf48428bce2dbfeda219e64eb 100644 |
--- a/chrome/browser/extensions/api/image_writer_private/test_utils.h |
+++ b/chrome/browser/extensions/api/image_writer_private/test_utils.h |
@@ -6,7 +6,6 @@ |
#define CHROME_BROWSER_EXTENSIONS_API_IMAGE_WRITER_PRIVATE_TEST_UTILS_H_ |
#include "base/file_util.h" |
-#include "base/files/scoped_temp_dir.h" |
#include "base/message_loop/message_loop.h" |
#include "base/run_loop.h" |
#include "chrome/browser/extensions/api/image_writer_private/operation_manager.h" |
@@ -18,16 +17,8 @@ |
namespace image_writer { |
const char kDummyExtensionId[] = "DummyExtension"; |
+const char kTestData[] = "This is some test data, padded. "; |
-// Default file size to use in tests. Currently 32kB. |
-const int kTestFileSize = 32 * 1024; |
-// Pattern to use in the image file. |
-const int kImagePattern = 0x55555555; // 01010101 |
-// Pattern to use in the device file. |
-const int kDevicePattern = 0xAAAAAAAA; // 10101010 |
- |
-// A mock around the operation manager for tracking callbacks. Note that there |
-// are non-virtual methods on this class that should not be called in tests. |
class MockOperationManager : public OperationManager { |
public: |
MockOperationManager(); |
@@ -46,32 +37,15 @@ |
const std::string& error_message)); |
}; |
-// Base class for unit tests that manages creating image and device files. |
class ImageWriterUnitTestBase : public testing::Test { |
public: |
- ImageWriterUnitTestBase(); |
- virtual ~ImageWriterUnitTestBase(); |
- |
- protected: |
virtual void SetUp() OVERRIDE; |
virtual void TearDown() OVERRIDE; |
- // Compare the image and device files, returning true if they are the same, |
- // false if different. |
- bool CompareImageAndDevice(); |
- |
- base::ScopedTempDir temp_dir_; |
- base::FilePath test_image_path_; |
- base::FilePath test_device_path_; |
- |
+ base::FilePath test_image_; |
+ base::FilePath test_device_; |
private: |
- // Fills |file| with |length| bytes of |pattern|, overwriting any existing |
- // data. |
- bool FillFile(const base::FilePath& file, |
- const int pattern, |
- const int length); |
- |
content::TestBrowserThreadBundle thread_bundle_; |
}; |