1
0
Fork 0

No issue: fixes master (#5777)

master
Sawyer Blatz 2019-10-03 14:42:56 -07:00 committed by GitHub
parent 371e2ac3d8
commit 841b06b02f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 7 additions and 9 deletions

View File

@ -136,7 +136,7 @@ open class FenixApplication : Application() {
* private mode was in use during the previous session.
*/
fun maybeClearPrivateMode(settings: Settings = settings()) {
if (!settings.alwaysOpenInPrivateMode) settings.usePrivateMode = false
if (!settings.openLinksInAPrivateTab) settings.usePrivateMode = false
}
private fun registerRxExceptionHandling() {

View File

@ -50,7 +50,7 @@ class IntentReceiverActivity : Activity() {
if (didLaunchPrivateLink && Browsers.all(this).isDefaultBrowser) {
this.settings().openLinksInAPrivateTab = true
} 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
}

View File

@ -30,8 +30,8 @@ class FenixApplicationTest {
}
@Test
fun `GIVEN alwaysOpenInPrivateMode is active WHEN maybeClearPrivateMode is called THEN private mode should not be changed`() {
every { settings.alwaysOpenInPrivateMode } returns true
fun `GIVEN openLinksInAPrivateTab is active WHEN maybeClearPrivateMode is called THEN private mode should not be changed`() {
every { settings.openLinksInAPrivateTab } returns true
application.maybeClearPrivateMode(settings)
@ -39,8 +39,8 @@ class FenixApplicationTest {
}
@Test
fun `GIVEN alwaysOpenInPrivateMode is inactive WHEN maybeClearPrivateMode is called THEN private mode should be disabled`() {
every { settings.alwaysOpenInPrivateMode } returns false
fun `GIVEN openLinksInAPrivateTab is inactive WHEN maybeClearPrivateMode is called THEN private mode should be disabled`() {
every { settings.openLinksInAPrivateTab } returns false
application.maybeClearPrivateMode(settings)

File diff suppressed because one or more lines are too long