Skip to content

Commit

Permalink
Rename method
Browse files Browse the repository at this point in the history
  • Loading branch information
CrisBarreiro committed Nov 7, 2024
1 parent 9c1542a commit b658dfe
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5377,10 +5377,10 @@ class BrowserTabViewModelTest {
givenCurrentSite(url)

testee.onRefreshRequested(triggeredByUser = false)
verify(mockBrokenSitePrompt, never()).pageLoaded(any())
verify(mockBrokenSitePrompt, never()).pageRefreshed(any())

testee.onRefreshRequested(triggeredByUser = true)
verify(mockBrokenSitePrompt).pageLoaded(url.toUri())
verify(mockBrokenSitePrompt).pageRefreshed(url.toUri())
}

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1235,7 +1235,7 @@ class BrowserTabViewModel @Inject constructor(
if (triggeredByUser) {
site?.realBrokenSiteContext?.onUserTriggeredRefresh()
site?.uri?.let {
brokenSitePrompt.pageLoaded(it)
brokenSitePrompt.pageRefreshed(it)
}
privacyProtectionsPopupManager.onPageRefreshTriggeredByUser(isOmnibarAtTheTop = settingsDataStore.omnibarPosition == TOP)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ interface BrokenSitePrompt {

suspend fun isFeatureEnabled(): Boolean

fun pageLoaded(url: Uri)
fun pageRefreshed(url: Uri)

fun resetRefreshCount()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ class RealBrokenSitePrompt @Inject constructor(
return _featureEnabled
}

override fun pageLoaded(
override fun pageRefreshed(
url: Uri,
) {
brokenSiteReportRepository.addRefresh(url, currentTimeProvider.localDateTimeNow())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ class RealBrokenSitePromptTest {
val url: Uri = org.mockito.kotlin.mock()

whenever(mockCurrentTimeProvider.localDateTimeNow()).thenReturn(now)
testee.pageLoaded(url)
testee.pageRefreshed(url)

verify(mockBrokenSiteReportRepository).addRefresh(url, now)
}
Expand Down

0 comments on commit b658dfe

Please sign in to comment.