Index: services/shape_detection/face_detection_impl_mac_unittest.mm |
diff --git a/services/shape_detection/face_detection_impl_mac_unittest.mm b/services/shape_detection/face_detection_impl_mac_unittest.mm |
index d5f52757ad19bcee0dd2c02e7bbb1b0e1952b559..c8c2ed6bca55ef1979c0bb3de92ae19684cf046d 100644 |
--- a/services/shape_detection/face_detection_impl_mac_unittest.mm |
+++ b/services/shape_detection/face_detection_impl_mac_unittest.mm |
@@ -82,24 +82,12 @@ TEST_P(FaceDetectionImplMacTest, ScanOneFace) { |
const int num_bytes = size.GetArea() * 4 /* bytes per pixel */; |
ASSERT_EQ(num_bytes, image->computeSize64()); |
- // Generate a new ScopedSharedBufferHandle of the aproppriate size, map it and |
- // copy the image pixels into it. |
- mojo::ScopedSharedBufferHandle handle = |
- mojo::SharedBufferHandle::Create(num_bytes); |
- ASSERT_TRUE(handle->is_valid()); |
- |
- mojo::ScopedSharedBufferMapping mapping = handle->Map(num_bytes); |
- ASSERT_TRUE(mapping); |
- |
- memcpy(mapping.get(), image->getPixels(), num_bytes); |
- |
base::RunLoop run_loop; |
base::Closure quit_closure = run_loop.QuitClosure(); |
// Send the image to Detect() and expect the response in callback. |
EXPECT_CALL(*this, Detection()).WillOnce(RunClosure(quit_closure)); |
- impl_->Detect(std::move(handle), size.width(), size.height(), |
- base::Bind(&FaceDetectionImplMacTest::DetectCallback, |
- base::Unretained(this))); |
+ impl_->Detect(*image, base::Bind(&FaceDetectionImplMacTest::DetectCallback, |
+ base::Unretained(this))); |
run_loop.Run(); |
} |