Index: chrome/browser/extensions/api/image_writer_private/operation_unittest.cc |
diff --git a/chrome/browser/extensions/api/image_writer_private/operation_unittest.cc b/chrome/browser/extensions/api/image_writer_private/operation_unittest.cc |
index d835836318cb2d46eed716fdf8d57a2cebaeb259..b7b25c23ea0d4ea041524bdd1d959f6c8a3c3a19 100644 |
--- a/chrome/browser/extensions/api/image_writer_private/operation_unittest.cc |
+++ b/chrome/browser/extensions/api/image_writer_private/operation_unittest.cc |
@@ -78,10 +78,6 @@ class ImageWriterOperationTest : public ImageWriterUnitTestBase { |
zip::Zip(temp_dir_.path(), zip_file_, true); |
} |
- virtual void TearDown() OVERRIDE { |
- ImageWriterUnitTestBase::TearDown(); |
- } |
- |
base::ScopedTempDir temp_dir_; |
base::FilePath image_file_; |
base::FilePath zip_file_; |
@@ -89,10 +85,11 @@ class ImageWriterOperationTest : public ImageWriterUnitTestBase { |
} // namespace |
-#if defined(OS_LINUX) && !defined(OS_CHROMEOS) |
+#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_WIN) |
// Tests a successful unzip. |
TEST_F(ImageWriterOperationTest, Unzip) { |
- MockOperationManager manager; |
+ base::RunLoop loop; |
+ QuittingMockManager manager(loop.QuitClosure()); |
scoped_refptr<OperationForTest> operation( |
new OperationForTest(manager.AsWeakPtr(), |
@@ -128,9 +125,9 @@ TEST_F(ImageWriterOperationTest, Unzip) { |
operation, |
base::Passed(&zip_file))); |
- base::RunLoop().RunUntilIdle(); |
+ loop.Run(); |
- EXPECT_TRUE(base::ContentsEqual(image_file_, test_device_path_)); |
+ EXPECT_TRUE(ImageWrittenToDevice(image_file_, test_device_path_)); |
} |
#endif |