New issue
Advanced search Search tips

Issue 824591 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Apr 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Android , Windows , Chrome , Mac
Pri: 2
Type: Bug



Sign in to add a comment

Make sensors share memory in DeviceOrientation and DeviceMotion unit tests and browser tests

Project Member Reported by juncai@chromium.org, Mar 22 2018

Issue description

Currently in the DeviceOrientation and DeviceMotion unit tests and browser tests, each FakeSensor creates its own shared memory. While in the production code, only one piece of shared memory is created and all sensors share it. This prevents the unit tests and browser tests to detect the  issue 805146 .
 

Comment 1 by juncai@chromium.org, Mar 22 2018

Status: Started (was: Assigned)
Project Member

Comment 2 by bugdroid1@chromium.org, Apr 3 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/5b2a35f89bcabba11860de34f955555bc16f0963

commit 5b2a35f89bcabba11860de34f955555bc16f0963
Author: Jun Cai <juncai@chromium.org>
Date: Tue Apr 03 22:22:14 2018

Make sensors share memory in DeviceOrientation and DeviceMotion tests

Currently in the DeviceOrientation and DeviceMotion unit tests and
browser tests, each fake sensor creates a new shared memory handle.
While in the production code, only one shared memory handle is created
and all sensors share it, and write data to that shared memory using
different offset. This CL updates the FakeSensor and FakeSensorProvider
to match the behavior of production code.

Bug:  824591 
Change-Id: I545d73b0d864a3b7093a387d007cab26fb912d91
Reviewed-on: https://chromium-review.googlesource.com/978856
Commit-Queue: Jun Cai <juncai@chromium.org>
Reviewed-by: Tim Volodine <timvolodine@chromium.org>
Reviewed-by: Reilly Grant <reillyg@chromium.org>
Cr-Commit-Position: refs/heads/master@{#547848}
[modify] https://crrev.com/5b2a35f89bcabba11860de34f955555bc16f0963/content/browser/device_sensors/device_sensor_browsertest.cc
[modify] https://crrev.com/5b2a35f89bcabba11860de34f955555bc16f0963/content/browser/generic_sensor/generic_sensor_browsertest.cc
[modify] https://crrev.com/5b2a35f89bcabba11860de34f955555bc16f0963/content/renderer/device_sensors/device_motion_event_pump_unittest.cc
[modify] https://crrev.com/5b2a35f89bcabba11860de34f955555bc16f0963/content/renderer/device_sensors/device_orientation_event_pump_unittest.cc
[delete] https://crrev.com/dd3590f2e3c79406c29a2b53ad796e854a2ae3a5/content/renderer/device_sensors/fake_sensor_and_provider.cc
[delete] https://crrev.com/dd3590f2e3c79406c29a2b53ad796e854a2ae3a5/content/renderer/device_sensors/fake_sensor_and_provider.h
[modify] https://crrev.com/5b2a35f89bcabba11860de34f955555bc16f0963/content/test/BUILD.gn
[modify] https://crrev.com/5b2a35f89bcabba11860de34f955555bc16f0963/services/device/public/cpp/generic_sensor/sensor_traits.cc
[modify] https://crrev.com/5b2a35f89bcabba11860de34f955555bc16f0963/services/device/public/cpp/generic_sensor/sensor_traits.h
[modify] https://crrev.com/5b2a35f89bcabba11860de34f955555bc16f0963/services/device/public/cpp/test/BUILD.gn
[add] https://crrev.com/5b2a35f89bcabba11860de34f955555bc16f0963/services/device/public/cpp/test/fake_sensor_and_provider.cc
[add] https://crrev.com/5b2a35f89bcabba11860de34f955555bc16f0963/services/device/public/cpp/test/fake_sensor_and_provider.h

Status: Fixed (was: Started)

Sign in to add a comment