In device sensors browsertests , eliminate the dependency on //device/sensors/ |
||||
Issue descriptionIn 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).
,
Feb 22 2017
,
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.
,
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"
,
Mar 27 2017
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?
,
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!
,
Mar 29 2017
Great!
,
May 19 2017
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/
,
Nov 7 2017
|
||||
►
Sign in to add a comment |
||||
Comment 1 Deleted