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

Side by Side Diff: chrome/utility/image_writer/image_writer_unittest.cc

Issue 294163008: Adds USB writing for OS X. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@list-devices
Patch Set: Creates a location for code shared between browser and utility process. Created 6 years, 6 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <string> 5 #include <string>
6 6
7 #include "base/file_util.h" 7 #include "base/file_util.h"
8 #include "base/files/scoped_temp_dir.h" 8 #include "base/files/scoped_temp_dir.h"
9 #include "base/run_loop.h" 9 #include "base/run_loop.h"
10 #include "chrome/utility/image_writer/error_messages.h" 10 #include "chrome/utility/image_writer/error_messages.h"
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after
220 EXPECT_CALL(mock_handler, SendSucceeded()).Times(2); 220 EXPECT_CALL(mock_handler, SendSucceeded()).Times(2);
221 EXPECT_CALL(mock_handler, SendFailed(_)).Times(0); 221 EXPECT_CALL(mock_handler, SendFailed(_)).Times(0);
222 222
223 FillDefault(image_path_); 223 FillDefault(image_path_);
224 224
225 image_writer.Write(); 225 image_writer.Write();
226 226
227 base::RunLoop().RunUntilIdle(); 227 base::RunLoop().RunUntilIdle();
228 } 228 }
229 229
230 TEST_F(ImageWriterUtilityTest, UnmountMac) {
231 base::RunLoop loop;
232 const base::Closure quit_closure = loop.QuitClosure();
233
234 VerifyingHandler mock_handler;
235 ImageWriter image_writer(&mock_handler, image_path_, base::FilePath("disk3"));
236
237 mock_handler.image_writer_ = &image_writer;
238
239 image_writer.UnmountVolumes(quit_closure);
240
241 loop.Run();
242 }
243
230 } // namespace image_writer 244 } // namespace image_writer
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698