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

Unified Diff: content/browser/device_sensors/data_fetcher_shared_memory_base_unittest.cc

Issue 2037513002: Convert device_sensors to use mojo. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@conversion--mime-registry
Patch Set: Created 4 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
Index: content/browser/device_sensors/data_fetcher_shared_memory_base_unittest.cc
diff --git a/content/browser/device_sensors/data_fetcher_shared_memory_base_unittest.cc b/content/browser/device_sensors/data_fetcher_shared_memory_base_unittest.cc
index 73ce50242ad30baed55421c2237c5db375c6caf6..581f10c7479220a535897c470a3726121ff3c233 100644
--- a/content/browser/device_sensors/data_fetcher_shared_memory_base_unittest.cc
+++ b/content/browser/device_sensors/data_fetcher_shared_memory_base_unittest.cc
@@ -536,17 +536,15 @@ TEST(DataFetcherSharedMemoryBaseTest, DoesPollMotionAndOrientation) {
EXPECT_TRUE(fake_data_fetcher.StartFetchingDeviceData(
CONSUMER_TYPE_ORIENTATION));
- base::SharedMemoryHandle handle_orientation =
- fake_data_fetcher.GetSharedMemoryHandleForProcess(
- CONSUMER_TYPE_ORIENTATION, base::GetCurrentProcessHandle());
- EXPECT_TRUE(base::SharedMemory::IsHandleValid(handle_orientation));
+ mojo::ScopedSharedBufferHandle handle_orientation =
+ fake_data_fetcher.GetSharedMemoryHandle(CONSUMER_TYPE_ORIENTATION);
+ EXPECT_TRUE(handle_orientation.is_valid());
EXPECT_TRUE(fake_data_fetcher.StartFetchingDeviceData(
CONSUMER_TYPE_MOTION));
- base::SharedMemoryHandle handle_motion =
- fake_data_fetcher.GetSharedMemoryHandleForProcess(
- CONSUMER_TYPE_MOTION, base::GetCurrentProcessHandle());
- EXPECT_TRUE(base::SharedMemory::IsHandleValid(handle_motion));
+ mojo::ScopedSharedBufferHandle handle_motion =
+ fake_data_fetcher.GetSharedMemoryHandle(CONSUMER_TYPE_MOTION);
+ EXPECT_TRUE(handle_motion.is_valid());
fake_data_fetcher.WaitForStart(CONSUMER_TYPE_ORIENTATION);
fake_data_fetcher.WaitForStart(CONSUMER_TYPE_MOTION);

Powered by Google App Engine
This is Rietveld 408576698