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

Unified Diff: chrome/browser/chromeos/file_manager/volume_manager_unittest.cc

Issue 2348813002: Fix a bug that unmounting devices on the policy update can be a busy loop. (Closed)
Patch Set: Format fix, use reference where copy isn't needed. Created 4 years, 3 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
Index: chrome/browser/chromeos/file_manager/volume_manager_unittest.cc
diff --git a/chrome/browser/chromeos/file_manager/volume_manager_unittest.cc b/chrome/browser/chromeos/file_manager/volume_manager_unittest.cc
index 12eaa24fa0a7256133564b06d1c1e9113c33cad4..dee9b6eb5be0b62c2f7c1e246ece680e20cd36c2 100644
--- a/chrome/browser/chromeos/file_manager/volume_manager_unittest.cc
+++ b/chrome/browser/chromeos/file_manager/volume_manager_unittest.cc
@@ -722,6 +722,10 @@ TEST_F(VolumeManagerTest, OnExternalStorageDisabledChanged) {
profile()->GetPrefs()->SetBoolean(prefs::kExternalStorageDisabled, true);
volume_manager()->OnExternalStorageDisabledChanged();
+ // Wait until all unmount request finishes, so that callback chain to unmount
+ // all the mount points will be invoked.
+ disk_mount_manager_->FinishAllUnmountPathRequests();
+
// The all mount points should be unmounted.
EXPECT_EQ(0U, disk_mount_manager_->mount_points().size());

Powered by Google App Engine
This is Rietveld 408576698