|
|
|
@ -4,13 +4,18 @@
|
|
|
|
|
|
|
|
|
|
package org.mozilla.fenix.trackingprotection
|
|
|
|
|
|
|
|
|
|
import io.mockk.mockk
|
|
|
|
|
import org.junit.Assert.assertEquals
|
|
|
|
|
import org.junit.Assert.assertNotSame
|
|
|
|
|
import kotlinx.coroutines.runBlocking
|
|
|
|
|
import mozilla.components.browser.session.Session
|
|
|
|
|
import mozilla.components.concept.engine.content.blocking.Tracker
|
|
|
|
|
import org.junit.Test
|
|
|
|
|
|
|
|
|
|
class TrackingProtectionStoreTest {
|
|
|
|
|
|
|
|
|
|
val session: Session = mockk(relaxed = true)
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
|
fun enterDetailsMode() = runBlocking {
|
|
|
|
|
val initialState = defaultState()
|
|
|
|
@ -143,6 +148,7 @@ class TrackingProtectionStoreTest {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private fun defaultState(): TrackingProtectionState = TrackingProtectionState(
|
|
|
|
|
session = session,
|
|
|
|
|
url = "www.mozilla.org",
|
|
|
|
|
isTrackingProtectionEnabled = true,
|
|
|
|
|
listTrackers = listOf(),
|
|
|
|
@ -151,6 +157,7 @@ class TrackingProtectionStoreTest {
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
private fun detailsState(): TrackingProtectionState = TrackingProtectionState(
|
|
|
|
|
session = session,
|
|
|
|
|
url = "www.mozilla.org",
|
|
|
|
|
isTrackingProtectionEnabled = true,
|
|
|
|
|
listTrackers = listOf(),
|
|
|
|
|