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

Unified Diff: chrome/browser/extensions/api/image_writer_private/destroy_partitions_operation_unittest.cc

Issue 382053004: Adds API test for imageWriterPrivate.writeFromFile (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixes memory leak. Created 6 years, 5 months 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
« no previous file with comments | « no previous file | chrome/browser/extensions/api/image_writer_private/image_writer_private_apitest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/api/image_writer_private/destroy_partitions_operation_unittest.cc
diff --git a/chrome/browser/extensions/api/image_writer_private/destroy_partitions_operation_unittest.cc b/chrome/browser/extensions/api/image_writer_private/destroy_partitions_operation_unittest.cc
index af09c427f621484858a7a1ce677fd10305849602..9363a1ad7bc0c4813ed10b3d8d44dc0003077b54 100644
--- a/chrome/browser/extensions/api/image_writer_private/destroy_partitions_operation_unittest.cc
+++ b/chrome/browser/extensions/api/image_writer_private/destroy_partitions_operation_unittest.cc
@@ -22,16 +22,12 @@ class ImageWriterDestroyPartitionsOperationTest
TEST_F(ImageWriterDestroyPartitionsOperationTest, EndToEnd) {
TestingProfile profile;
MockOperationManager manager(&profile);
- scoped_refptr<FakeImageWriterClient> client = FakeImageWriterClient::Create();
scoped_refptr<DestroyPartitionsOperation> operation(
- new DestroyPartitionsOperation(manager.AsWeakPtr(),
- kDummyExtensionId,
- test_device_path_.AsUTF8Unsafe()));
-
-#if !defined(OS_CHROMEOS)
- operation->SetUtilityClientForTesting(client);
-#endif
+ new DestroyPartitionsOperation(
+ manager.AsWeakPtr(),
+ kDummyExtensionId,
+ test_utils_.GetDevicePath().AsUTF8Unsafe()));
EXPECT_CALL(
manager,
@@ -54,10 +50,10 @@ TEST_F(ImageWriterDestroyPartitionsOperationTest, EndToEnd) {
base::RunLoop().RunUntilIdle();
#if !defined(OS_CHROMEOS)
- client->Progress(0);
- client->Progress(50);
- client->Progress(100);
- client->Success();
+ test_utils_.GetUtilityClient()->Progress(0);
+ test_utils_.GetUtilityClient()->Progress(50);
+ test_utils_.GetUtilityClient()->Progress(100);
+ test_utils_.GetUtilityClient()->Success();
base::RunLoop().RunUntilIdle();
#endif
« no previous file with comments | « no previous file | chrome/browser/extensions/api/image_writer_private/image_writer_private_apitest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698