Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(46)

Issue 2774783003: [DeviceService] Add service tests for VibrationManager. (Closed)

Created:
3 years, 9 months ago by leonhsl(Using Gerrit)
Modified:
3 years, 8 months ago
CC:
chromium-reviews
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

[DeviceService] Add service tests for VibrationManager. VibrationManagerImpl.java is in //device/vibration while the VibrationManagerImplTest.java is still in //content, to be able to hide all //device/vibration impl inside Device Service, we must eliminate this concrete dependency on //device/vibration from content layer. As VibrationManagerImplTest.java is an integration test based on content shell test infra, we can't move it outside of //content. So we consider to use other tests to replace it, while the renderer-side testing has already been covered by layout tests created at https://codereview.chromium.org/2731953003/, so we create this CL to cover the VibrationManager interface impl testing: - creates an infra for Device Service service tests. - adds a new service test for VibrationManager interface. Then after this CL we'll be able to hide all vibration impl inside Device Service with a follow-up CL. BUG=689379 TEST=service_unittests Review-Url: https://codereview.chromium.org/2774783003 Cr-Commit-Position: refs/heads/master@{#463612} Committed: https://chromium.googlesource.com/chromium/src/+/9c17bee62f1e16224fabb7c83bbeaab719015761

Patch Set 1 #

Total comments: 5

Patch Set 2 : Add {file,io} task runners in test base #

Total comments: 3

Patch Set 3 : Rebase only #

Patch Set 4 : Let service_test app itself register mojo JNIs #

Total comments: 13

Patch Set 5 : Rebase only #

Patch Set 6 : Do not let service_unittests depend directly on device service java target #

Patch Set 7 : Address comments from blundell@ #

Unified diffs Side-by-side diffs Delta from patch set Stats (+335 lines, -166 lines) Patch
M content/public/android/BUILD.gn View 1 2 3 4 2 chunks +0 lines, -3 lines 0 comments Download
D content/public/android/javatests/src/org/chromium/content/browser/VibrationManagerImplTest.java View 1 chunk +0 lines, -128 lines 0 comments Download
M device/vibration/android/BUILD.gn View 1 chunk +7 lines, -0 lines 0 comments Download
M device/vibration/android/java/src/org/chromium/device/vibration/VibrationManagerImpl.java View 5 chunks +29 lines, -28 lines 0 comments Download
M device/vibration/vibration_manager_impl.h View 1 chunk +3 lines, -0 lines 0 comments Download
M device/vibration/vibration_manager_impl_default.cc View 2 chunks +8 lines, -1 line 0 comments Download
M services/BUILD.gn View 1 2 3 4 5 2 chunks +5 lines, -2 lines 0 comments Download
M services/device/BUILD.gn View 1 2 3 4 5 7 chunks +54 lines, -4 lines 0 comments Download
A services/device/device_service_test_base.h View 1 chunk +28 lines, -0 lines 0 comments Download
A services/device/device_service_test_base.cc View 1 2 3 4 5 6 1 chunk +91 lines, -0 lines 0 comments Download
A services/device/unittest_manifest.json View 1 chunk +16 lines, -0 lines 0 comments Download
A services/device/vibration/vibration_manager_impl_unittest.cc View 1 chunk +81 lines, -0 lines 0 comments Download
M services/service_manager/public/cpp/test/BUILD.gn View 1 2 3 1 chunk +4 lines, -0 lines 0 comments Download
M services/service_manager/public/cpp/test/run_all_service_tests.cc View 1 2 3 2 chunks +9 lines, -0 lines 0 comments Download

Messages

Total messages: 129 (107 generated)
leonhsl(Using Gerrit)
Hi, Colin, I thought ps#1 should be able to work well but our service_unittests is ...
3 years, 9 months ago (2017-03-27 08:16:03 UTC) #56
leonhsl(Using Gerrit)
Hi, Colin, I've solved the failure on Android bot and updated CL, PTAL, Thanks! https://codereview.chromium.org/2774783003/diff/290001/services/device/android/register_jni.cc ...
3 years, 8 months ago (2017-03-28 07:27:52 UTC) #73
blundell
This looks great! https://codereview.chromium.org/2774783003/diff/290001/services/device/android/register_jni.cc File services/device/android/register_jni.cc (right): https://codereview.chromium.org/2774783003/diff/290001/services/device/android/register_jni.cc#newcode17 services/device/android/register_jni.cc:17: const base::android::RegistrationMethod kRegisteredMethods[] = { On ...
3 years, 8 months ago (2017-03-28 12:40:47 UTC) #76
leonhsl(Using Gerrit)
Hi, Colin, PTAnL at ps#2, the red trybots now are not caused by this CL, ...
3 years, 8 months ago (2017-03-29 07:37:16 UTC) #81
blundell
On 2017/03/29 07:37:16, leonhsl wrote: > Hi, Colin, PTAnL at ps#2, the red trybots now ...
3 years, 8 months ago (2017-03-29 10:05:13 UTC) #86
leonhsl(Using Gerrit)
> Ah I see, I had somewhat misunderstood the situation. Two thoughts: > > (1) ...
3 years, 8 months ago (2017-03-30 12:24:21 UTC) #91
blundell
lgtm, thanks! https://codereview.chromium.org/2774783003/diff/310001/services/device/device_service_test_base.cc File services/device/device_service_test_base.cc (right): https://codereview.chromium.org/2774783003/diff/310001/services/device/device_service_test_base.cc#newcode74 services/device/device_service_test_base.cc:74: base::Thread io_thread_; nit: These should be moved ...
3 years, 8 months ago (2017-03-31 11:22:30 UTC) #98
leonhsl(Using Gerrit)
PTAL, Thanks! Ken: OWNER review of services/* and device/* # services/device/* have been stamped by ...
3 years, 8 months ago (2017-03-31 12:14:46 UTC) #100
Avi (use Gerrit)
lgtm stampy
3 years, 8 months ago (2017-03-31 14:21:40 UTC) #101
leonhsl(Using Gerrit)
+jam@ +timvolodine@ Would you PTAL at this? Thanks! John: OWNER review for services/device/BUILD.gn services/service_manager/public/cpp/test/BUILD.gn services/service_manager/public/cpp/test/run_all_service_tests.cc ...
3 years, 8 months ago (2017-04-05 02:41:45 UTC) #103
timvolodine
Hi Leon, regarding device/vibration a question below: https://codereview.chromium.org/2774783003/diff/350001/device/vibration/android/java/src/org/chromium/device/vibration/VibrationManagerImpl.java File device/vibration/android/java/src/org/chromium/device/vibration/VibrationManagerImpl.java (right): https://codereview.chromium.org/2774783003/diff/350001/device/vibration/android/java/src/org/chromium/device/vibration/VibrationManagerImpl.java#newcode35 device/vibration/android/java/src/org/chromium/device/vibration/VibrationManagerImpl.java:35: private static ...
3 years, 8 months ago (2017-04-05 17:16:29 UTC) #104
leonhsl(Using Gerrit)
Hi, Tim, Thanks a lot for review! https://codereview.chromium.org/2774783003/diff/350001/device/vibration/android/java/src/org/chromium/device/vibration/VibrationManagerImpl.java File device/vibration/android/java/src/org/chromium/device/vibration/VibrationManagerImpl.java (right): https://codereview.chromium.org/2774783003/diff/350001/device/vibration/android/java/src/org/chromium/device/vibration/VibrationManagerImpl.java#newcode35 device/vibration/android/java/src/org/chromium/device/vibration/VibrationManagerImpl.java:35: private static ...
3 years, 8 months ago (2017-04-06 03:19:16 UTC) #105
timvolodine
some more comments: https://codereview.chromium.org/2774783003/diff/350001/content/public/android/javatests/src/org/chromium/content/browser/VibrationManagerImplTest.java File content/public/android/javatests/src/org/chromium/content/browser/VibrationManagerImplTest.java (left): https://codereview.chromium.org/2774783003/diff/350001/content/public/android/javatests/src/org/chromium/content/browser/VibrationManagerImplTest.java#oldcode29 content/public/android/javatests/src/org/chromium/content/browser/VibrationManagerImplTest.java:29: public class VibrationManagerImplTest { If there ...
3 years, 8 months ago (2017-04-07 10:39:07 UTC) #106
leonhsl(Using Gerrit)
Thanks Tim a lot for review! https://codereview.chromium.org/2774783003/diff/350001/content/public/android/javatests/src/org/chromium/content/browser/VibrationManagerImplTest.java File content/public/android/javatests/src/org/chromium/content/browser/VibrationManagerImplTest.java (left): https://codereview.chromium.org/2774783003/diff/350001/content/public/android/javatests/src/org/chromium/content/browser/VibrationManagerImplTest.java#oldcode29 content/public/android/javatests/src/org/chromium/content/browser/VibrationManagerImplTest.java:29: public class VibrationManagerImplTest ...
3 years, 8 months ago (2017-04-08 00:51:01 UTC) #107
jam
lgtm
3 years, 8 months ago (2017-04-10 14:53:56 UTC) #108
Ken Rockot(use gerrit already)
https://codereview.chromium.org/2774783003/diff/350001/services/BUILD.gn File services/BUILD.gn (right): https://codereview.chromium.org/2774783003/diff/350001/services/BUILD.gn#newcode27 services/BUILD.gn:27: "//services/device:java", Can this not just be a public_deps in ...
3 years, 8 months ago (2017-04-10 21:29:32 UTC) #109
leonhsl(Using Gerrit)
On 2017/04/10 21:29:32, Ken Rockot wrote: > https://codereview.chromium.org/2774783003/diff/350001/services/BUILD.gn > File services/BUILD.gn (right): > > https://codereview.chromium.org/2774783003/diff/350001/services/BUILD.gn#newcode27 ...
3 years, 8 months ago (2017-04-11 05:07:41 UTC) #116
Ken Rockot(use gerrit already)
lgtm
3 years, 8 months ago (2017-04-11 05:11:37 UTC) #117
leonhsl(Using Gerrit)
Uploaded ps#7 to address a comment from Colin which I missed before... https://codereview.chromium.org/2774783003/diff/310001/services/device/device_service_test_base.cc File services/device/device_service_test_base.cc ...
3 years, 8 months ago (2017-04-11 08:32:02 UTC) #120
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2774783003/410001
3 years, 8 months ago (2017-04-11 13:41:41 UTC) #125
commit-bot: I haz the power
Committed patchset #7 (id:410001) as https://chromium.googlesource.com/chromium/src/+/9c17bee62f1e16224fabb7c83bbeaab719015761
3 years, 8 months ago (2017-04-11 13:48:29 UTC) #128
please use gerrit instead
3 years, 8 months ago (2017-04-11 14:45:37 UTC) #129
Message was sent while issue was closed.
A revert of this CL (patchset #7 id:410001) has been created in
https://codereview.chromium.org/2815623003/ by rouslan@chromium.org.

The reason for reverting is: Appears to have broken service_unittests on Nexus
5X..

Powered by Google App Engine
This is Rietveld 408576698