commit | b7d218f0b6193b948a3c516cf72b902d9321a836 | [log] [tgz] |
---|---|---|
author | Mugdha Lakhani <[email protected]> | Mon Sep 09 14:48:23 2019 |
committer | Commit Bot <[email protected]> | Mon Sep 09 14:48:23 2019 |
tree | d972e7892fc6e4de8dc7942cd48771442321064d | |
parent | c2ba6bd79e7e03592287d70d23da37d58ef83452 [diff] [blame] |
[Background Sync] Instrumentation tests. Add some instrumentation tests for Background Sync. We currently don't have any that run on Android, and this CL bridges that gap. A previous attempt was made at this here: https://chromium-review.googlesource.com/c/chromium/src/+/1534160 but it worked by fluke, since our test devices happened to have network connectivity. That can't be guaranteed so this CL mocks out network connection type. It also mocks out BackgroundTaskScheduler because the last attempt was failing to get the BackgroundTaskScheduler delegate for Android L and below. This was because Google Play services isn't up to date on our test devices. Bug: 996664 Change-Id: I904664a87e31439a65c0f9a04a1c9c4b21d03bdc Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1768321 Commit-Queue: Mugdha Lakhani <[email protected]> Reviewed-by: Ted Choc <[email protected]> Reviewed-by: Peter Conn <[email protected]> Reviewed-by: Rayan Kanso <[email protected]> Cr-Commit-Position: refs/heads/master@{#694759}
diff --git a/chrome/browser/android/background_sync_launcher_android.cc b/chrome/browser/android/background_sync_launcher_android.cc index a9284287..8e46fe8 100644 --- a/chrome/browser/android/background_sync_launcher_android.cc +++ b/chrome/browser/android/background_sync_launcher_android.cc
@@ -61,6 +61,13 @@ blink::mojom::BackgroundSyncType::PERIODIC, j_runnable); } +void JNI_BackgroundSyncBackgroundTaskScheduler_SetPlayServicesVersionCheckDisabledForTests( + JNIEnv* env, + jboolean disabled) { + BackgroundSyncLauncherAndroid::SetPlayServicesVersionCheckDisabledForTests( + disabled); +} + // static BackgroundSyncLauncherAndroid* BackgroundSyncLauncherAndroid::Get() { DCHECK_CURRENTLY_ON(BrowserThread::UI);