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

Issue 1829023002: Add fake for InstanceIDWithSubtype.java, in order to re-use unit test (Closed)

Created:
4 years, 9 months ago by johnme
Modified:
4 years, 8 months ago
CC:
chromium-reviews, zea+watch_chromium.org, droger+watchlist_chromium.org, blundell+watchlist_chromium.org, johnme+watch_chromium.org, sdefresne+watchlist_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@iid2jni
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Add fake for InstanceIDWithSubtype.java, in order to re-use unit test Adds FakeInstanceIDWithSubtype, which closely mimics the behavior of the Google Play Services InstanceID class (but doesn't make network requests of course). Hence InstanceIDDriverTest (instance_id_driver_unittest.cc) is enabled on Android, verifying that the behavior there is the same as the existing behavior that it is testing on desktop. Part of a series of patches: 1. https://codereview.chromium.org/1832833002 adds InstanceIDWithSubtype 2. https://codereview.chromium.org/1830983002 adds JNI bindings 3. this patch 4. https://codereview.chromium.org/1899753002 fixes strict mode violations 5. https://codereview.chromium.org/1854093002 enables InstanceID by default 6. https://codereview.chromium.org/1851423003 switches Push to InstanceIDs BUG=589461 Committed: https://crrev.com/8638071c84e5112bcbffee71da8db79378422546 Cr-Commit-Position: refs/heads/master@{#389128}

Patch Set 1 #

Patch Set 2 : Rebase #

Patch Set 3 : Rebae #

Patch Set 4 : Tweaks #

Total comments: 12

Patch Set 5 : Stop using NestedMessagePumpAndroid #

Patch Set 6 : Remove boilerplate, with InstanceIDBridge.BridgeAsyncTask<Result> #

Patch Set 7 : Address review comments except moving FakeInstanceIDWithSubtype to javatests/ #

Patch Set 8 : Move FakeInstanceIDWithSubtype to javatests/ #

Total comments: 38

Patch Set 9 : Address 2nd round review comments #

Total comments: 2

Patch Set 10 : Use scoped objects #

Patch Set 11 : Fix indirect GN dep #

Patch Set 12 : Fix GN #

Patch Set 13 : Rebase #

Patch Set 14 : Fix GYP #

Patch Set 15 : Fix FindBugs #

Patch Set 16 : Re-fix FindBugs #

Unified diffs Side-by-side diffs Delta from patch set Stats (+397 lines, -26 lines) Patch
M components/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 4 chunks +4 lines, -2 lines 0 comments Download
M components/components_tests.gyp View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +2 lines, -1 line 0 comments Download
M components/gcm_driver.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 3 chunks +33 lines, -0 lines 0 comments Download
M components/gcm_driver/instance_id/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +9 lines, -1 line 0 comments Download
M components/gcm_driver/instance_id/android/BUILD.gn View 1 2 3 4 5 6 7 2 chunks +19 lines, -0 lines 0 comments Download
M components/gcm_driver/instance_id/android/java/src/org/chromium/components/gcm_driver/instance_id/InstanceIDBridge.java View 1 2 3 4 5 6 7 8 9 10 chunks +68 lines, -18 lines 0 comments Download
M components/gcm_driver/instance_id/android/java/src/org/chromium/components/gcm_driver/instance_id/InstanceIDWithSubtype.java View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 5 chunks +24 lines, -4 lines 0 comments Download
A components/gcm_driver/instance_id/android/javatests/src/org/chromium/components/gcm_driver/instance_id/FakeInstanceIDWithSubtype.java View 1 2 3 4 5 6 7 8 9 1 chunk +133 lines, -0 lines 0 comments Download
M components/gcm_driver/instance_id/instance_id_android.h View 1 2 3 4 5 6 7 8 9 1 chunk +13 lines, -0 lines 0 comments Download
M components/gcm_driver/instance_id/instance_id_android.cc View 1 2 3 4 5 6 7 8 9 1 chunk +13 lines, -0 lines 0 comments Download
M components/gcm_driver/instance_id/instance_id_driver_unittest.cc View 1 2 3 4 5 6 7 8 9 4 chunks +13 lines, -0 lines 0 comments Download
A components/gcm_driver/instance_id/scoped_use_fake_instance_id_android.h View 1 2 3 4 5 6 7 8 9 1 chunk +32 lines, -0 lines 0 comments Download
A components/gcm_driver/instance_id/scoped_use_fake_instance_id_android.cc View 1 2 3 4 5 6 7 8 9 1 chunk +30 lines, -0 lines 0 comments Download
M components/test/run_all_unittests.cc View 1 2 3 4 5 6 7 8 9 2 chunks +4 lines, -0 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 61 (30 generated)
johnme
4 years, 9 months ago (2016-03-24 19:44:39 UTC) #1
johnme
4 years, 8 months ago (2016-04-05 19:11:38 UTC) #4
johnme
Actually, perhaps it makes more sense for Peter to review this issue, as it's mostly ...
4 years, 8 months ago (2016-04-05 19:12:44 UTC) #6
johnme
4 years, 8 months ago (2016-04-05 19:12:52 UTC) #8
Peter Beverloo
https://codereview.chromium.org/1829023002/diff/60001/components/components_tests.gyp File components/components_tests.gyp (right): https://codereview.chromium.org/1829023002/diff/60001/components/components_tests.gyp#newcode1413 components/components_tests.gyp:1413: '../content/content_shell_and_tests.gyp:layouttest_support_content', I am not comfortable with adding this dependency, ...
4 years, 8 months ago (2016-04-11 14:57:05 UTC) #9
Peter Beverloo
https://codereview.chromium.org/1829023002/diff/60001/components/gcm_driver/instance_id/android/java/src/org/chromium/components/gcm_driver/instance_id/FakeInstanceIDWithSubtype.java File components/gcm_driver/instance_id/android/java/src/org/chromium/components/gcm_driver/instance_id/FakeInstanceIDWithSubtype.java (right): https://codereview.chromium.org/1829023002/diff/60001/components/gcm_driver/instance_id/android/java/src/org/chromium/components/gcm_driver/instance_id/FakeInstanceIDWithSubtype.java#newcode20 components/gcm_driver/instance_id/android/java/src/org/chromium/components/gcm_driver/instance_id/FakeInstanceIDWithSubtype.java:20: * Fake for InstanceIDWithSubtype. One higher-level concern I have ...
4 years, 8 months ago (2016-04-11 15:16:14 UTC) #10
johnme
Addressed review comments - thanks! https://codereview.chromium.org/1829023002/diff/60001/components/components_tests.gyp File components/components_tests.gyp (right): https://codereview.chromium.org/1829023002/diff/60001/components/components_tests.gyp#newcode1413 components/components_tests.gyp:1413: '../content/content_shell_and_tests.gyp:layouttest_support_content', On 2016/04/11 14:57:05, ...
4 years, 8 months ago (2016-04-14 18:32:42 UTC) #11
Peter Beverloo
Let's continue with PS8. While it indeed is more plumbing, it allows us to avoid ...
4 years, 8 months ago (2016-04-15 00:00:18 UTC) #12
johnme
Addressed 2nd round of review comments - thanks! https://codereview.chromium.org/1829023002/diff/140001/components/BUILD.gn File components/BUILD.gn (left): https://codereview.chromium.org/1829023002/diff/140001/components/BUILD.gn#oldcode254 components/BUILD.gn:254: "//components/gcm_driver/instance_id:unit_tests", ...
4 years, 8 months ago (2016-04-15 16:00:43 UTC) #13
Peter Beverloo
lgtm https://codereview.chromium.org/1829023002/diff/160001/components/gcm_driver/instance_id/instance_id_driver_unittest.cc File components/gcm_driver/instance_id/instance_id_driver_unittest.cc (right): https://codereview.chromium.org/1829023002/diff/160001/components/gcm_driver/instance_id/instance_id_driver_unittest.cc#newcode116 components/gcm_driver/instance_id/instance_id_driver_unittest.cc:116: InstanceIDTestUtilsAndroid::ClearDataAndSetUseFakeForTesting(true); Would we ever used them separately? Could ...
4 years, 8 months ago (2016-04-18 15:46:36 UTC) #15
johnme
caitkp@chromium.org: Please review components/BUILD.gn and components/test/run_all_unittests.cc - thanks!
4 years, 8 months ago (2016-04-19 11:09:51 UTC) #17
johnme
https://codereview.chromium.org/1829023002/diff/160001/components/gcm_driver/instance_id/instance_id_driver_unittest.cc File components/gcm_driver/instance_id/instance_id_driver_unittest.cc (right): https://codereview.chromium.org/1829023002/diff/160001/components/gcm_driver/instance_id/instance_id_driver_unittest.cc#newcode116 components/gcm_driver/instance_id/instance_id_driver_unittest.cc:116: InstanceIDTestUtilsAndroid::ClearDataAndSetUseFakeForTesting(true); On 2016/04/18 15:46:36, Peter Beverloo wrote: > Would ...
4 years, 8 months ago (2016-04-19 11:15:43 UTC) #18
Cait (Slow)
lgtm
4 years, 8 months ago (2016-04-19 15:11:38 UTC) #19
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1829023002/180001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1829023002/180001
4 years, 8 months ago (2016-04-19 16:32:56 UTC) #22
commit-bot: I haz the power
Try jobs failed on following builders: android_chromium_gn_compile_dbg on tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/android_chromium_gn_compile_dbg/builds/53182) android_chromium_gn_compile_rel on tryserver.chromium.android (JOB_FAILED, ...
4 years, 8 months ago (2016-04-19 16:41:59 UTC) #24
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1829023002/200001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1829023002/200001
4 years, 8 months ago (2016-04-19 17:23:45 UTC) #27
commit-bot: I haz the power
Try jobs failed on following builders: android_chromium_gn_compile_dbg on tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/android_chromium_gn_compile_dbg/builds/53216) android_chromium_gn_compile_rel on tryserver.chromium.android (JOB_FAILED, ...
4 years, 8 months ago (2016-04-19 17:28:54 UTC) #29
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1829023002/220001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1829023002/220001
4 years, 8 months ago (2016-04-21 10:35:05 UTC) #32
commit-bot: I haz the power
Try jobs failed on following builders: ios_dbg_simulator_gn on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios_dbg_simulator_gn/builds/22755) ios_dbg_simulator_ninja on tryserver.chromium.mac (JOB_FAILED, ...
4 years, 8 months ago (2016-04-21 10:36:55 UTC) #34
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1829023002/240001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1829023002/240001
4 years, 8 months ago (2016-04-21 13:05:46 UTC) #37
commit-bot: I haz the power
Try jobs failed on following builders: android_arm64_dbg_recipe on tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/android_arm64_dbg_recipe/builds/54142)
4 years, 8 months ago (2016-04-21 13:22:47 UTC) #39
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1829023002/260001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1829023002/260001
4 years, 8 months ago (2016-04-21 14:22:59 UTC) #42
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_compile_dbg_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_compile_dbg_ng/builds/82599) mac_chromium_rel_ng on tryserver.chromium.mac (JOB_FAILED, ...
4 years, 8 months ago (2016-04-21 14:32:49 UTC) #44
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1829023002/260001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1829023002/260001
4 years, 8 months ago (2016-04-21 17:16:32 UTC) #46
commit-bot: I haz the power
Try jobs failed on following builders: android_clang_dbg_recipe on tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/android_clang_dbg_recipe/builds/54482)
4 years, 8 months ago (2016-04-21 17:56:08 UTC) #48
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1829023002/280001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1829023002/280001
4 years, 8 months ago (2016-04-22 12:12:50 UTC) #51
commit-bot: I haz the power
Try jobs failed on following builders: android_clang_dbg_recipe on tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/android_clang_dbg_recipe/builds/55095)
4 years, 8 months ago (2016-04-22 13:03:08 UTC) #53
Peter Beverloo
Have you considered building locally?...
4 years, 8 months ago (2016-04-22 13:41:01 UTC) #54
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1829023002/300001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1829023002/300001
4 years, 8 months ago (2016-04-22 14:33:02 UTC) #57
commit-bot: I haz the power
Committed patchset #16 (id:300001)
4 years, 8 months ago (2016-04-22 16:07:43 UTC) #59
commit-bot: I haz the power
4 years, 8 months ago (2016-04-22 19:48:19 UTC) #61
Message was sent while issue was closed.
Patchset 16 (id:??) landed as
https://crrev.com/8638071c84e5112bcbffee71da8db79378422546
Cr-Commit-Position: refs/heads/master@{#389128}

Powered by Google App Engine
This is Rietveld 408576698