2019-05-07 23:36:37 +02:00
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
2019-07-12 20:38:15 +02:00
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
2019-05-07 23:36:37 +02:00
|
|
|
|
2020-04-01 23:06:05 +02:00
|
|
|
package org.mozilla.fenix.helpers
|
2019-05-07 23:36:37 +02:00
|
|
|
|
2020-04-01 23:06:05 +02:00
|
|
|
import org.mozilla.fenix.FenixApplication
|
2019-05-07 23:36:37 +02:00
|
|
|
import org.mozilla.fenix.components.TestComponents
|
|
|
|
|
2020-04-01 23:07:26 +02:00
|
|
|
/**
|
2020-04-03 17:25:30 +02:00
|
|
|
* An override of our application for use in Robolectric-based unit tests. We're forced to override
|
|
|
|
* because our standard application fails to initialize in Robolectric with exceptions like:
|
|
|
|
* "Crash handler service must run in a separate process".
|
2020-04-01 23:07:26 +02:00
|
|
|
*/
|
|
|
|
class FenixRobolectricTestApplication : FenixApplication() {
|
2019-05-07 23:36:37 +02:00
|
|
|
|
2019-09-20 20:33:55 +02:00
|
|
|
override val components = TestComponents(this)
|
2019-05-07 23:36:37 +02:00
|
|
|
|
2020-08-04 20:18:52 +02:00
|
|
|
override fun initializeGlean() = Unit
|
|
|
|
|
2019-11-22 14:18:50 +01:00
|
|
|
override fun setupInAllProcesses() = Unit
|
|
|
|
|
|
|
|
override fun setupInMainProcessOnly() = Unit
|
2019-05-07 23:36:37 +02:00
|
|
|
}
|