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

Unified Diff: chrome/browser/storage_monitor/storage_monitor_win_unittest.cc

Issue 15767005: [MediaGalleries] Add temp dir adjustment in windows unit test. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 7 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/storage_monitor/storage_monitor_win_unittest.cc
diff --git a/chrome/browser/storage_monitor/storage_monitor_win_unittest.cc b/chrome/browser/storage_monitor/storage_monitor_win_unittest.cc
index dbb3474f190d9a876439b1efcea9d375474d2383..ed9396dfa5072d720707295ea00edb53145e20e4 100644
--- a/chrome/browser/storage_monitor/storage_monitor_win_unittest.cc
+++ b/chrome/browser/storage_monitor/storage_monitor_win_unittest.cc
@@ -151,7 +151,7 @@ void StorageMonitorWinTest::DoMassStorageDeviceAttachedTest(
volume_broadcast.dbcv_unitmask = 0x0;
volume_broadcast.dbcv_flags = 0x0;
- int expect_attach_calls = 0;
+ int expect_attach_calls = observer_.attach_calls();
for (DeviceIndices::const_iterator it = device_indices.begin();
it != device_indices.end(); ++it) {
volume_broadcast.dbcv_unitmask |= 0x1 << *it;
@@ -291,6 +291,7 @@ TEST_F(StorageMonitorWinTest, DevicesAttached) {
TEST_F(StorageMonitorWinTest, PathMountDevices) {
PreAttachDevices();
+ int init_storages = monitor_->GetAttachedStorage().size();
volume_mount_watcher_->AddDeviceForTesting(
base::FilePath(FILE_PATH_LITERAL("F:\\mount1")),
@@ -302,7 +303,7 @@ TEST_F(StorageMonitorWinTest, PathMountDevices) {
base::FilePath(FILE_PATH_LITERAL("F:\\mount2")),
"dcim:mount2", L"mount2", 100);
RunUntilIdle();
- EXPECT_EQ(9, monitor_->GetAttachedStorage().size());
+ EXPECT_EQ(init_storages + 3, monitor_->GetAttachedStorage().size());
StorageInfo info;
EXPECT_TRUE(monitor_->GetStorageInfoForPath(

Powered by Google App Engine
This is Rietveld 408576698