Commit c9e8ebd9 authored by Filip Gorski's avatar Filip Gorski Committed by Commit Bot

[FIXIT] Add JUnit coverage to DeviceConditions

* Mostly adds tests covering 100% of DeviceConditions
* Makes NetworkChangeNotifier expose resetting of its instance to
  tests outside of its direct package (to enable unit testing).

Bug: 1066565
Change-Id: I20012d10e3b55a903fb15b65a39d5ef50359e5ab
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2128717Reviewed-by: default avatarYaron Friedman <yfriedman@chromium.org>
Commit-Queue: Filip Gorski <fgorski@chromium.org>
Cr-Commit-Position: refs/heads/master@{#755383}
parent 2780d02e
...@@ -75,7 +75,8 @@ public class NetworkChangeNotifier { ...@@ -75,7 +75,8 @@ public class NetworkChangeNotifier {
return sInstance != null; return sInstance != null;
} }
static void resetInstanceForTests(NetworkChangeNotifier notifier) { @VisibleForTesting
public static void resetInstanceForTests(NetworkChangeNotifier notifier) {
sInstance = notifier; sInstance = notifier;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment