Skip to content

Commit

Permalink
For mozilla-mobile#10467 - removed unused tests and resources related…
Browse files Browse the repository at this point in the history
… to blue dot notification
  • Loading branch information
BranescuMihai committed Jun 24, 2020
1 parent 2f98f7a commit ba3d57e
Show file tree
Hide file tree
Showing 6 changed files with 0 additions and 154 deletions.
5 changes: 0 additions & 5 deletions app/src/main/java/org/mozilla/fenix/utils/Settings.kt
Original file line number Diff line number Diff line change
Expand Up @@ -224,11 +224,6 @@ class Settings private constructor(
default = ""
)

var readerModeOpened by booleanPreference(
appContext.getPreferenceKey(R.string.pref_key_reader_mode_opened),
default = false
)

var openInAppOpened by booleanPreference(
appContext.getPreferenceKey(R.string.pref_key_open_in_app_opened),
default = false
Expand Down
1 change: 0 additions & 1 deletion app/src/main/res/values/preference_keys.xml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@
<string name="pref_key_experimentation" translatable="false">pref_key_experimentation</string>
<string name="pref_key_showed_private_mode_cfr" translatable="false">pref_key_showed_private_mode_cfr</string>
<string name="pref_key_private_mode_opened" translatable="false">pref_key_private_mode_opened</string>
<string name="pref_key_reader_mode_opened" translatable="false">pref_key_reader_mode_opened</string>
<string name="pref_key_open_in_app_opened" translatable="false">pref_key_open_in_app_opened</string>
<string name="pref_key_install_pwa_opened" translatable="false">pref_key_install_pwa_opened</string>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,13 +62,4 @@ class BrowserInteractorTest {

verify { browserToolbarController.handleToolbarItemInteraction(item) }
}

@Test
fun onBrowserMenuDismissed() {
val itemList: List<ToolbarMenu.Item> = listOf()

interactor.onBrowserMenuDismissed(itemList)

verify { browserToolbarController.handleBrowserMenuDismissed(itemList) }
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ import org.mozilla.fenix.components.metrics.Event
import org.mozilla.fenix.components.metrics.MetricController
import org.mozilla.fenix.ext.components
import org.mozilla.fenix.ext.nav
import org.mozilla.fenix.ext.settings
import org.mozilla.fenix.ext.toTab
import org.mozilla.fenix.helpers.FenixRobolectricTestRunner
import org.mozilla.fenix.home.Tab
Expand Down Expand Up @@ -185,22 +184,6 @@ class DefaultBrowserToolbarControllerTest {
verify { onTabCounterClicked() }
}

@Test
fun `handle BrowserMenu dismissed with all options available`() = runBlockingTest {
val itemList: List<ToolbarMenu.Item> = listOf(
ToolbarMenu.Item.AddToHomeScreen,
ToolbarMenu.Item.OpenInApp
)

val activity = HomeActivity()

val controller = createController(scope = this, activity = activity)
controller.handleBrowserMenuDismissed(itemList)

assertEquals(true, activity.settings().installPwaOpened)
assertEquals(true, activity.settings().openInAppOpened)
}

@Test
fun handleToolbarClick() = runBlockingTest {
every { currentSession.id } returns "1"
Expand Down

This file was deleted.

13 changes: 0 additions & 13 deletions app/src/test/java/org/mozilla/fenix/utils/SettingsTest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -304,19 +304,6 @@ class SettingsTest {
assertFalse(settings.shouldUseTrackingProtection)
}

@Test
fun shouldSetReaderModeOpened() {
// When
// Then
assertFalse(settings.readerModeOpened)

// When
settings.readerModeOpened = true

// Then
assertTrue(settings.readerModeOpened)
}

@Test
fun shouldSetOpenInAppOpened() {
// When
Expand Down

0 comments on commit ba3d57e

Please sign in to comment.