2
0
mirror of https://github.com/fork-maintainers/iceraven-browser synced 2024-11-15 18:12:54 +00:00

No issue: Update testing dependencies and deprecated method (#4608)

This commit is contained in:
Emily Kager 2019-08-08 09:03:39 -07:00 committed by Sawyer Blatz
parent ff6e9bccb7
commit c21c91eac5
3 changed files with 6 additions and 4 deletions

View File

@ -393,6 +393,7 @@ dependencies {
exclude module: 'espresso-core' exclude module: 'espresso-core'
} }
androidTestImplementation Deps.androidx_test_core
androidTestImplementation Deps.espresso_idling_resources androidTestImplementation Deps.espresso_idling_resources
androidTestImplementation Deps.tools_test_runner androidTestImplementation Deps.tools_test_runner

View File

@ -9,7 +9,7 @@ import java.io.IOException
import android.net.Uri import android.net.Uri
import android.os.Handler import android.os.Handler
import android.os.Looper import android.os.Looper
import androidx.test.InstrumentationRegistry import androidx.test.platform.app.InstrumentationRegistry
import okhttp3.mockwebserver.Dispatcher import okhttp3.mockwebserver.Dispatcher
import okhttp3.mockwebserver.MockResponse import okhttp3.mockwebserver.MockResponse
import okhttp3.mockwebserver.MockWebServer import okhttp3.mockwebserver.MockWebServer
@ -47,7 +47,7 @@ class AndroidAssetDispatcher : Dispatcher() {
private val mainThreadHandler = Handler(Looper.getMainLooper()) private val mainThreadHandler = Handler(Looper.getMainLooper())
override fun dispatch(request: RecordedRequest): MockResponse { override fun dispatch(request: RecordedRequest): MockResponse {
val assetManager = InstrumentationRegistry.getContext().assets val assetManager = InstrumentationRegistry.getInstrumentation().targetContext.assets
val assetContents = try { val assetContents = try {
val pathNoLeadingSlash = request.path.drop(1) val pathNoLeadingSlash = request.path.drop(1)
assetManager.open(pathNoLeadingSlash).use { inputStream -> assetManager.open(pathNoLeadingSlash).use { inputStream ->

View File

@ -27,7 +27,7 @@ object Versions {
const val androidx_navigation = "2.2.0-alpha01" const val androidx_navigation = "2.2.0-alpha01"
const val androidx_recyclerview = "1.1.0-beta02" const val androidx_recyclerview = "1.1.0-beta02"
const val androidx_lifecycle_savedstate = "1.0.0-alpha01" const val androidx_lifecycle_savedstate = "1.0.0-alpha01"
const val androidx_testing = "1.1.0-alpha08" const val androidx_testing = "1.2.1-alpha02"
const val androidx_test_ext = "1.0.0" const val androidx_test_ext = "1.0.0"
const val androidx_core = "1.2.0-alpha03" const val androidx_core = "1.2.0-alpha03"
const val androidx_paging = "2.1.0" const val androidx_paging = "2.1.0"
@ -205,8 +205,9 @@ object Deps {
const val tools_test_runner = "com.android.support.test:runner:${Versions.tools_test_runner}" const val tools_test_runner = "com.android.support.test:runner:${Versions.tools_test_runner}"
const val uiautomator = "com.android.support.test.uiautomator:uiautomator-v18:${Versions.uiautomator}" const val uiautomator = "com.android.support.test.uiautomator:uiautomator-v18:${Versions.uiautomator}"
const val robolectric = "org.robolectric:robolectric:${Versions.robolectric}" const val robolectric = "org.robolectric:robolectric:${Versions.robolectric}"
const val fragment_testing = "androidx.fragment:fragment-testing:${Versions.androidx_testing}" const val fragment_testing = "androidx.fragment:fragment-testing:${Versions.androidx_fragment}"
const val androidx_junit = "androidx.test.ext:junit:${Versions.androidx_test_ext}" const val androidx_junit = "androidx.test.ext:junit:${Versions.androidx_test_ext}"
const val androidx_test_core ="androidx.test:core:${Versions.androidx_testing}"
const val fenix_megazord = "org.mozilla.appservices:fenix-megazord:${Versions.mozilla_appservices}" const val fenix_megazord = "org.mozilla.appservices:fenix-megazord:${Versions.mozilla_appservices}"
const val fenix_megazord_forUnitTests = "org.mozilla.appservices:fenix-megazord-forUnitTests:${Versions.mozilla_appservices}" const val fenix_megazord_forUnitTests = "org.mozilla.appservices:fenix-megazord-forUnitTests:${Versions.mozilla_appservices}"