New issue
Advanced search Search tips

Issue 694888 link

Starred by 1 user

Issue metadata

Status: WontFix
Owner: ----
Closed: May 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug

Blocking:
issue 612322



Sign in to add a comment

In device sensors browsertests , eliminate the dependency on //device/sensors/

Project Member Reported by ke...@intel.com, Feb 22 2017

Issue description

In file "device_sensor_browsertest.cc", it depends below files which are in //device/sensors/ (not in //device/sensors/public/)

#include "device/sensors/data_fetcher_shared_memory.h"
#include "device/sensors/device_sensor_service.h"

we need to eliminate that dependency (e.g., by porting the browsertests to service tests of the Device Service).

 

Comment 1 Deleted

Labels: DeviceService
Status: Available (was: Untriaged)

Comment 3 by ke...@intel.com, Mar 24 2017

In device_sensor_browsertest, it opens some test htmls by content_shell, and mocks the data_fetcher in browser side, then in Javascript code it verifies the data is as expected.

Because there is layouttest already for device_sensor. So I think replacing device_sensor_browsertest by an "service test" is enough.

Comment 4 by ke...@intel.com, Mar 24 2017

Because for sensor, the mojo call is fired in //content/renderer instead of blink, so both layouttest and the new to-be-added "servcie test" cannot cover the code in //content/renderer. So strictly it is not totally same as original browsertests.

But the code in //content/renderer will be removed by OnionSoup project sooner or later, I guess we can add just replace browsertest by "service test" 
Hi,

This comment: https://cs.chromium.org/chromium/src/content/renderer/device_sensors/device_sensor_event_pump.h?q=device_sensor_event+package:%5Echromium$&l=31

makes me think that the layout tests are in fact running the code in //content/renderer. Do you mind verifying whether that's actually the case?

Comment 6 Deleted

Comment 7 by ke...@intel.com, Mar 29 2017

I'm sorry, yes you are right. Code in //content/renderer are run in layouttest:

https://cs.chromium.org/chromium/src/content/renderer/renderer_blink_platform_impl.cc?rcl=95bac4bef674761b73170615dc960444b535695b&l=1199
and
https://cs.chromium.org/chromium/src/content/renderer/device_sensors/device_orientation_event_pump.cc?rcl=b40b402c7c6bfef5538ca4b28f8acc36764b5f70&l=68

So in layouttest, although the mojo connection is not created, the shared memory data is mocked. So my concern above(comment 4) is not correct.

I'll start to replace the browsertest by "service test". Thanks!
Great!

Comment 9 by ke...@intel.com, May 19 2017

Status: WontFix (was: Available)
As Reilly is planing to merge sensor into generic_sensor, so we set this as WontFix.

The obsolete CL "Replace device_sensor browsertest by service unittest.": 
https://codereview.chromium.org/2812223006/
Components: Internals>Services>Device

Sign in to add a comment