No issue: fixes master (#5777)
parent
371e2ac3d8
commit
841b06b02f
|
@ -136,7 +136,7 @@ open class FenixApplication : Application() {
|
||||||
* private mode was in use during the previous session.
|
* private mode was in use during the previous session.
|
||||||
*/
|
*/
|
||||||
fun maybeClearPrivateMode(settings: Settings = settings()) {
|
fun maybeClearPrivateMode(settings: Settings = settings()) {
|
||||||
if (!settings.alwaysOpenInPrivateMode) settings.usePrivateMode = false
|
if (!settings.openLinksInAPrivateTab) settings.usePrivateMode = false
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun registerRxExceptionHandling() {
|
private fun registerRxExceptionHandling() {
|
||||||
|
|
|
@ -50,7 +50,7 @@ class IntentReceiverActivity : Activity() {
|
||||||
if (didLaunchPrivateLink && Browsers.all(this).isDefaultBrowser) {
|
if (didLaunchPrivateLink && Browsers.all(this).isDefaultBrowser) {
|
||||||
this.settings().openLinksInAPrivateTab = true
|
this.settings().openLinksInAPrivateTab = true
|
||||||
} else if (!Browsers.all(this).isDefaultBrowser) {
|
} else if (!Browsers.all(this).isDefaultBrowser) {
|
||||||
/* If the user has unset us as the default browser, unset alwaysOpenInPrivateMode */
|
/* If the user has unset us as the default browser, unset openLinksInAPrivateTab */
|
||||||
this.settings().openLinksInAPrivateTab = false
|
this.settings().openLinksInAPrivateTab = false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -30,8 +30,8 @@ class FenixApplicationTest {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun `GIVEN alwaysOpenInPrivateMode is active WHEN maybeClearPrivateMode is called THEN private mode should not be changed`() {
|
fun `GIVEN openLinksInAPrivateTab is active WHEN maybeClearPrivateMode is called THEN private mode should not be changed`() {
|
||||||
every { settings.alwaysOpenInPrivateMode } returns true
|
every { settings.openLinksInAPrivateTab } returns true
|
||||||
|
|
||||||
application.maybeClearPrivateMode(settings)
|
application.maybeClearPrivateMode(settings)
|
||||||
|
|
||||||
|
@ -39,8 +39,8 @@ class FenixApplicationTest {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun `GIVEN alwaysOpenInPrivateMode is inactive WHEN maybeClearPrivateMode is called THEN private mode should be disabled`() {
|
fun `GIVEN openLinksInAPrivateTab is inactive WHEN maybeClearPrivateMode is called THEN private mode should be disabled`() {
|
||||||
every { settings.alwaysOpenInPrivateMode } returns false
|
every { settings.openLinksInAPrivateTab } returns false
|
||||||
|
|
||||||
application.maybeClearPrivateMode(settings)
|
application.maybeClearPrivateMode(settings)
|
||||||
|
|
||||||
|
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue