|
|
Replace device_sensor browsertest by service unittest.
To decouple device_sensor browsertest from //content, we have to port it into
//service/device as a service unittest.
Browsertest is an end to end test but browsertest cannot be decoupled out of
//content. So we use 1)Service unittest plus 2)Layouttest to replace the
browsertest.
Service unittest simulates how render side call the mojo interface which is
provided by browser side. Layouttest verifys the logics from JS API of blink to
render layer. So Service unittest plus Layouttest have the same test effect as
browsertest.
The layouttests for device/sensors already exist, so here we only add the
service unittests.
All the test cases of service unittest run in the same process, while the IO
thread will be re-created when setup each test case. But in the product code,
there are many thread_checkers to make sure the DeviceSensorService instance runs in
the same thread. So we have to use UI thread to simulate the IO thread in order
to not breaking those DCHECKs.
The shared_memory_seqlock_reader.{cc|h} is used by both render side and service
unittest, so move it into //device/sensors/public/cpp/ folder.
BUG= 694888
Total comments: 24
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+597 lines, -1231 lines) |
Patch |
 |
D |
content/browser/device_sensors/DEPS
|
View
|
|
1 chunk |
+0 lines, -3 lines |
0 comments
|
Download
|
 |
D |
content/browser/device_sensors/OWNERS
|
View
|
|
1 chunk |
+0 lines, -3 lines |
0 comments
|
Download
|
 |
D |
content/browser/device_sensors/device_sensor_browsertest.cc
|
View
|
|
1 chunk |
+0 lines, -469 lines |
0 comments
|
Download
|
 |
M |
content/renderer/BUILD.gn
|
View
|
1
2
3
4
5
6
7
8
|
1 chunk |
+0 lines, -2 lines |
0 comments
|
Download
|
 |
M |
content/renderer/device_sensors/device_light_event_pump.h
|
View
|
1
|
2 chunks |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
content/renderer/device_sensors/device_motion_event_pump.h
|
View
|
1
|
2 chunks |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
content/renderer/device_sensors/device_orientation_event_pump.h
|
View
|
1
|
2 chunks |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
D |
content/renderer/shared_memory_seqlock_reader.h
|
View
|
|
1 chunk |
+0 lines, -78 lines |
0 comments
|
Download
|
 |
D |
content/renderer/shared_memory_seqlock_reader.cc
|
View
|
|
1 chunk |
+0 lines, -62 lines |
0 comments
|
Download
|
 |
M |
content/test/BUILD.gn
|
View
|
1
2
3
4
5
6
7
8
|
2 chunks |
+0 lines, -3 lines |
0 comments
|
Download
|
 |
D |
content/test/data/device_sensors/device_inertial_sensor_diagnostics.html
|
View
|
1
2
3
4
5
6
|
1 chunk |
+0 lines, -228 lines |
0 comments
|
Download
|
 |
D |
content/test/data/device_sensors/device_light_infinity_test.html
|
View
|
1
2
3
4
5
6
|
1 chunk |
+0 lines, -29 lines |
0 comments
|
Download
|
 |
D |
content/test/data/device_sensors/device_light_test.html
|
View
|
1
2
3
4
5
6
|
1 chunk |
+0 lines, -31 lines |
0 comments
|
Download
|
 |
D |
content/test/data/device_sensors/device_motion_null_test.html
|
View
|
1
2
3
4
5
6
|
1 chunk |
+0 lines, -37 lines |
0 comments
|
Download
|
 |
D |
content/test/data/device_sensors/device_motion_test.html
|
View
|
1
2
3
4
5
6
|
1 chunk |
+0 lines, -40 lines |
0 comments
|
Download
|
 |
D |
content/test/data/device_sensors/device_orientation_absolute_null_test.html
|
View
|
1
2
3
4
5
6
|
1 chunk |
+0 lines, -31 lines |
0 comments
|
Download
|
 |
D |
content/test/data/device_sensors/device_orientation_absolute_test.html
|
View
|
1
2
3
4
5
6
|
1 chunk |
+0 lines, -35 lines |
0 comments
|
Download
|
 |
D |
content/test/data/device_sensors/device_orientation_null_test.html
|
View
|
1
2
3
4
5
6
|
1 chunk |
+0 lines, -31 lines |
0 comments
|
Download
|
 |
D |
content/test/data/device_sensors/device_orientation_test.html
|
View
|
1
2
3
4
5
6
|
1 chunk |
+0 lines, -36 lines |
0 comments
|
Download
|
 |
D |
content/test/data/device_sensors/device_sensors_null_test_with_alert.html
|
View
|
1
2
3
4
5
6
|
1 chunk |
+0 lines, -66 lines |
0 comments
|
Download
|
 |
M |
device/sensors/device_sensor_host.cc
|
View
|
1
2
3
|
1 chunk |
+0 lines, -2 lines |
0 comments
|
Download
|
 |
M |
device/sensors/device_sensor_service.cc
|
View
|
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
 |
M |
device/sensors/public/cpp/BUILD.gn
|
View
|
1
|
1 chunk |
+5 lines, -0 lines |
0 comments
|
Download
|
 |
A + |
device/sensors/public/cpp/shared_memory_seqlock_reader.h
|
View
|
1
|
3 chunks |
+12 lines, -14 lines |
0 comments
|
Download
|
 |
A + |
device/sensors/public/cpp/shared_memory_seqlock_reader.cc
|
View
|
1
|
2 chunks |
+12 lines, -12 lines |
0 comments
|
Download
|
 |
M |
services/BUILD.gn
|
View
|
1
2
3
4
5
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
 |
M |
services/device/BUILD.gn
|
View
|
1
2
3
4
5
6
7
8
|
2 chunks |
+3 lines, -0 lines |
0 comments
|
Download
|
 |
M |
services/device/device_service_test_base.h
|
View
|
1
2
3
4
5
6
7
|
2 chunks |
+3 lines, -0 lines |
0 comments
|
Download
|
 |
M |
services/device/device_service_test_base.cc
|
View
|
1
2
3
4
5
6
7
|
4 chunks |
+23 lines, -13 lines |
0 comments
|
Download
|
 |
A + |
services/device/sensors/DEPS
|
View
|
|
0 chunks |
+-1 lines, --1 lines |
0 comments
|
Download
|
 |
A + |
services/device/sensors/OWNERS
|
View
|
|
0 chunks |
+-1 lines, --1 lines |
0 comments
|
Download
|
 |
A |
services/device/sensors/device_sensor_service_unittest.cc
|
View
|
1
2
3
4
5
6
7
8
9
|
1 chunk |
+530 lines, -0 lines |
0 comments
|
Download
|
 |
M |
services/device/unittest_manifest.json
|
View
|
|
1 chunk |
+2 lines, -1 line |
0 comments
|
Download
|
 |
M |
services/service_manager/public/cpp/lib/service_test.cc
|
View
|
1
2
3
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
Dependent Patchsets:
Total messages: 65 (55 generated)
|