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

Unified Diff: components/storage_monitor/storage_monitor_win_unittest.cc

Issue 1250713002: Fix pointer truncation in component_unittests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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 | components/storage_monitor/test_storage_monitor_win.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/storage_monitor/storage_monitor_win_unittest.cc
diff --git a/components/storage_monitor/storage_monitor_win_unittest.cc b/components/storage_monitor/storage_monitor_win_unittest.cc
index 1db435f717a01e408967fd399692dbce19c32f53..84eb51e553ad78aaff54ae531526d9b9a8b8ea9e 100644
--- a/components/storage_monitor/storage_monitor_win_unittest.cc
+++ b/components/storage_monitor/storage_monitor_win_unittest.cc
@@ -165,7 +165,7 @@ void StorageMonitorWinTest::DoMassStorageDeviceAttachedTest(
expect_attach_calls++;
}
monitor_->InjectDeviceChange(DBT_DEVICEARRIVAL,
- reinterpret_cast<DWORD>(&volume_broadcast));
+ reinterpret_cast<LPARAM>(&volume_broadcast));
RunUntilIdle();
volume_mount_watcher_->FlushWorkerPoolForTesting();
@@ -195,7 +195,7 @@ void StorageMonitorWinTest::DoMassStorageDevicesDetachedTest(
++expect_detach_calls;
}
monitor_->InjectDeviceChange(DBT_DEVICEREMOVECOMPLETE,
- reinterpret_cast<DWORD>(&volume_broadcast));
+ reinterpret_cast<LPARAM>(&volume_broadcast));
RunUntilIdle();
EXPECT_EQ(pre_attach_calls, observer_.attach_calls());
EXPECT_EQ(expect_detach_calls, observer_.detach_calls());
@@ -241,7 +241,7 @@ void StorageMonitorWinTest::DoMTPDeviceTest(const base::string16& pnp_device_id,
monitor_->InjectDeviceChange(
test_attach ? DBT_DEVICEARRIVAL : DBT_DEVICEREMOVECOMPLETE,
- reinterpret_cast<DWORD>(dev_interface_broadcast.get()));
+ reinterpret_cast<LPARAM>(dev_interface_broadcast.get()));
RunUntilIdle();
EXPECT_EQ(expect_attach_calls, observer_.attach_calls());
@@ -416,7 +416,7 @@ TEST_F(StorageMonitorWinTest, DuplicateAttachCheckSuppressed) {
volume_broadcast.dbcv_flags = 0x0;
volume_broadcast.dbcv_unitmask = 0x100; // I: drive
monitor_->InjectDeviceChange(DBT_DEVICEARRIVAL,
- reinterpret_cast<DWORD>(&volume_broadcast));
+ reinterpret_cast<LPARAM>(&volume_broadcast));
EXPECT_EQ(0u, volume_mount_watcher_->devices_checked().size());
@@ -424,7 +424,7 @@ TEST_F(StorageMonitorWinTest, DuplicateAttachCheckSuppressed) {
// event, so there'll be pending calls in the UI thread to finish the
// device check notification, blocking the duplicate device injection.
monitor_->InjectDeviceChange(DBT_DEVICEARRIVAL,
- reinterpret_cast<DWORD>(&volume_broadcast));
+ reinterpret_cast<LPARAM>(&volume_broadcast));
EXPECT_EQ(0u, volume_mount_watcher_->devices_checked().size());
volume_mount_watcher_->ReleaseDeviceCheck();
@@ -443,7 +443,7 @@ TEST_F(StorageMonitorWinTest, DuplicateAttachCheckSuppressed) {
// We'll receive a duplicate check now that the first check has fully cleared.
monitor_->InjectDeviceChange(DBT_DEVICEARRIVAL,
- reinterpret_cast<DWORD>(&volume_broadcast));
+ reinterpret_cast<LPARAM>(&volume_broadcast));
volume_mount_watcher_->FlushWorkerPoolForTesting();
volume_mount_watcher_->ReleaseDeviceCheck();
RunUntilIdle();
« no previous file with comments | « no previous file | components/storage_monitor/test_storage_monitor_win.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698