|
|
Created:
3 years, 9 months ago by the real yoland Modified:
3 years, 9 months ago Reviewers:
pauljensen CC:
cbentzel+watch_chromium.org, chromium-reviews, net-reviews_chromium.org Target Ref:
refs/heads/master Project:
chromium Visibility:
Public. |
DescriptionConvert NetworkChangeNotifierTest.java to JUnit4
Move netIdNetwork and getCapabilities, which returns types that doesn't
exist in <21 SDK, to a inner helper class. JUnit4 test would crash if these
methods are part of the test class
BUG=640116
Review-Url: https://codereview.chromium.org/2755533002
Cr-Commit-Position: refs/heads/master@{#458760}
Committed: https://chromium.googlesource.com/chromium/src/+/7569715801917d9c4dd1bdc0182bd38ff3e43cae
Patch Set 1 #Patch Set 2 : Rebase #
Total comments: 2
Patch Set 3 : Address paul's comments #
Total comments: 4
Patch Set 4 : address comments #Messages
Total messages: 32 (22 generated)
The CQ bit was checked by yolandyan@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
yolandyan@chromium.org changed reviewers: + pauljensen@chromium.org, xunjieli@chromium.org
Description was changed from ========== Convert NetworkChangeNotifierTest.java to JUnit4 Move netIdNetwork and getCapabilities, which returns types that doesn't exist in <21 SDK. JUnit4 would crash if these methods are part of the test class BUG=640116 ========== to ========== Convert NetworkChangeNotifierTest.java to JUnit4 Move netIdNetwork and getCapabilities, which returns types that doesn't exist in <21 SDK, to a inner helper class. JUnit4 test would crash if these methods are part of the test class BUG=640116 ==========
The CQ bit was checked by yolandyan@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
Cool, thanks for doing this! Just one comment. https://codereview.chromium.org/2755533002/diff/20001/net/android/javatests/s... File net/android/javatests/src/org/chromium/net/NetworkChangeNotifierTest.java (right): https://codereview.chromium.org/2755533002/diff/20001/net/android/javatests/s... net/android/javatests/src/org/chromium/net/NetworkChangeNotifierTest.java:458: } Can we move mNetworkConstructor into NetworkChangeNotifierTestHelper and put this code into either a static block or perhaps initialize mNetworkConstructor with: mNetworkConstructor = (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) ? Network.class.getConstructor(Integer.TYPE) : null; or put the initializer code into a setUp() function in NetworkChangeNotifierTestHelper that gets called from here?
Description was changed from ========== Convert NetworkChangeNotifierTest.java to JUnit4 Move netIdNetwork and getCapabilities, which returns types that doesn't exist in <21 SDK, to a inner helper class. JUnit4 test would crash if these methods are part of the test class BUG=640116 ========== to ========== Convert NetworkChangeNotifierTest.java to JUnit4 Move netIdNetwork and getCapabilities, which returns types that doesn't exist in <21 SDK, to a inner helper class. JUnit4 test would crash if these methods are part of the test class BUG=640116 ==========
xunjieli@chromium.org changed reviewers: - xunjieli@chromium.org
Moving myself to cc, since Paul is on this :)
The CQ bit was checked by yolandyan@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
https://codereview.chromium.org/2755533002/diff/20001/net/android/javatests/s... File net/android/javatests/src/org/chromium/net/NetworkChangeNotifierTest.java (right): https://codereview.chromium.org/2755533002/diff/20001/net/android/javatests/s... net/android/javatests/src/org/chromium/net/NetworkChangeNotifierTest.java:458: } On 2017/03/15 at 12:10:26, pauljensen wrote: > Can we move mNetworkConstructor into NetworkChangeNotifierTestHelper and put this code into either a static block or perhaps initialize mNetworkConstructor with: > mNetworkConstructor = > (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) ? Network.class.getConstructor(Integer.TYPE) : null; > > or put the initializer code into a setUp() function in NetworkChangeNotifierTestHelper that gets called from here? I put the constructor as a static field in helper. Done
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
lgtm module two comments https://codereview.chromium.org/2755533002/diff/40001/net/android/javatests/s... File net/android/javatests/src/org/chromium/net/NetworkChangeNotifierTest.java (right): https://codereview.chromium.org/2755533002/diff/40001/net/android/javatests/s... net/android/javatests/src/org/chromium/net/NetworkChangeNotifierTest.java:107: private static class NetworkChangeNotifierTestHelper { Can we rename this to Helper? I don't see a need to restate the outer class's name. https://codereview.chromium.org/2755533002/diff/40001/net/android/javatests/s... net/android/javatests/src/org/chromium/net/NetworkChangeNotifierTest.java:108: private static Constructor<Network> sNetworkConstructor; final
https://codereview.chromium.org/2755533002/diff/40001/net/android/javatests/s... File net/android/javatests/src/org/chromium/net/NetworkChangeNotifierTest.java (right): https://codereview.chromium.org/2755533002/diff/40001/net/android/javatests/s... net/android/javatests/src/org/chromium/net/NetworkChangeNotifierTest.java:107: private static class NetworkChangeNotifierTestHelper { On 2017/03/21 at 11:27:55, pauljensen wrote: > Can we rename this to Helper? I don't see a need to restate the outer class's name. Done https://codereview.chromium.org/2755533002/diff/40001/net/android/javatests/s... net/android/javatests/src/org/chromium/net/NetworkChangeNotifierTest.java:108: private static Constructor<Network> sNetworkConstructor; On 2017/03/21 at 11:27:55, pauljensen wrote: > final Done
The CQ bit was checked by yolandyan@chromium.org
The patchset sent to the CQ was uploaded after l-g-t-m from pauljensen@chromium.org Link to the patchset: https://codereview.chromium.org/2755533002/#ps60001 (title: "address comments")
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Try jobs failed on following builders: ios-simulator-xcode-clang on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios-simulator-xco...)
The CQ bit was checked by yolandyan@chromium.org
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
CQ is committing da patch. Bot data: {"patchset_id": 60001, "attempt_start_ts": 1490197012321740, "parent_rev": "143d45a4d37530b757f17f9c308412064c7d053e", "commit_rev": "7569715801917d9c4dd1bdc0182bd38ff3e43cae"}
Message was sent while issue was closed.
Description was changed from ========== Convert NetworkChangeNotifierTest.java to JUnit4 Move netIdNetwork and getCapabilities, which returns types that doesn't exist in <21 SDK, to a inner helper class. JUnit4 test would crash if these methods are part of the test class BUG=640116 ========== to ========== Convert NetworkChangeNotifierTest.java to JUnit4 Move netIdNetwork and getCapabilities, which returns types that doesn't exist in <21 SDK, to a inner helper class. JUnit4 test would crash if these methods are part of the test class BUG=640116 Review-Url: https://codereview.chromium.org/2755533002 Cr-Commit-Position: refs/heads/master@{#458760} Committed: https://chromium.googlesource.com/chromium/src/+/7569715801917d9c4dd1bdc0182b... ==========
Message was sent while issue was closed.
Committed patchset #4 (id:60001) as https://chromium.googlesource.com/chromium/src/+/7569715801917d9c4dd1bdc0182b... |