summaryrefslogtreecommitdiffstats
path: root/mobile/android/geckoview/src/androidTest/java/org/mozilla/geckoview/test/crash/RuntimeCrashTestService.kt
blob: bfdc40621e4fd0a5253623a491fda9cc09f70fe1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
package org.mozilla.geckoview.test.crash

import android.content.Context
import android.content.Intent
import org.mozilla.geckoview.GeckoRuntime
import org.mozilla.geckoview.GeckoRuntimeSettings
import org.mozilla.geckoview.test.TestCrashHandler
import org.mozilla.geckoview.test.TestRuntimeService

class RuntimeCrashTestService : TestRuntimeService() {
    override fun createRuntime(context: Context, intent: Intent): GeckoRuntime {
        return GeckoRuntime.create(
            this.applicationContext,
            GeckoRuntimeSettings.Builder()
                .extras(intent.extras!!)
                .crashHandler(TestCrashHandler::class.java).build(),
        )
    }
}