brizental pushed to branch tor-browser-153.0esr-16.0-1 at The Tor Project / Applications / Tor Browser Commits: eac41a90 by Beatriz Rizental at 2026-07-28T16:18:31+02:00 fixup! TB 44694: [android] Remove new Tab bar feature Bug 45147: Enable android unit test builds. - - - - - 94f970fe by Beatriz Rizental at 2026-07-28T16:18:31+02:00 fixup! TB 44098: [android] Disable sync Bug 45147: Enable android unit test builds. - - - - - 5202d68f by Beatriz Rizental at 2026-07-28T16:18:31+02:00 fixup! TB 42655: [android] Implement "New circuit for this site" on Android Bug 45147: Enable android unit test builds. - - - - - de1a09f1 by Beatriz Rizental at 2026-07-28T16:18:31+02:00 fixup! [android] Disable features and functionality Bug 45147: Enable android unit test builds. - - - - - 092ce022 by Beatriz Rizental at 2026-07-28T16:18:31+02:00 fixup! [android] Delete unused media Bug 45147: Enable android unit test builds. - - - - - a054fea8 by Beatriz Rizental at 2026-07-28T16:18:31+02:00 fixup! [android] Modify UI/UX Bug 45147: Enable android unit test builds. - - - - - 7 changed files: - mobile/android/fenix/app/src/test/java/org/mozilla/fenix/bookmarks/BookmarksMiddlewareTest.kt - mobile/android/fenix/app/src/test/java/org/mozilla/fenix/components/menu/compose/MainMenuTest.kt - mobile/android/fenix/app/src/test/java/org/mozilla/fenix/components/metrics/MetricsUtilsTest.kt - mobile/android/fenix/app/src/test/java/org/mozilla/fenix/components/toolbar/BrowserToolbarMiddlewareTest.kt - mobile/android/fenix/app/src/test/java/org/mozilla/fenix/home/setup/store/ChecklistItemTest.kt - mobile/android/fenix/app/src/test/java/org/mozilla/fenix/settings/quicksettings/protections/cookiebanners/DefaultCookieBannerDetailsControllerTest.kt - mobile/android/fenix/app/src/test/java/org/mozilla/fenix/tabstray/TabManagerCfrControllerTest.kt Changes: ===================================== mobile/android/fenix/app/src/test/java/org/mozilla/fenix/bookmarks/BookmarksMiddlewareTest.kt ===================================== @@ -1230,31 +1230,8 @@ class BookmarksMiddlewareTest { assertFalse(exited) } - @Test - fun `GIVEN current screen is an empty list and the top-level is loaded WHEN sign into sync is clicked THEN navigate to sign into sync `() = - runTest { - coEvery { - bookmarksStorage.countBookmarksInTrees( - listOf( - BookmarkRoot.Menu.id, - BookmarkRoot.Toolbar.id, - BookmarkRoot.Unfiled.id, - ), - ) - } returns 0u - coEvery { bookmarksStorage.getTree(BookmarkRoot.Mobile.id) } returns Result.success( - generateBookmarkTree(), - ) - var navigated = false - navigateToSignIntoSync = { navigated = true } - val middleware = buildMiddleware(this) - val store = middleware.makeStore() - testScheduler.advanceUntilIdle() - - store.dispatch(SignIntoSyncClicked) - - assertTrue(navigated) - } + // tor-browser#44098: sign-into-sync from bookmarks was removed, along with the + // SignIntoSyncClicked action this test used to dispatch. @Test fun `GIVEN current screen is a subfolder WHEN close is clicked THEN exit bookmarks `() = ===================================== mobile/android/fenix/app/src/test/java/org/mozilla/fenix/components/menu/compose/MainMenuTest.kt ===================================== @@ -94,6 +94,7 @@ class MainMenuTest { onIPProtectionClick = {}, onIPProtectionNavigate = {}, onShareButtonClick = {}, + onNewCircuitButtonClick = {}, extensionsMenuItemDescription = null, moreSettingsSubmenu = {}, extensionSubmenu = {}, ===================================== mobile/android/fenix/app/src/test/java/org/mozilla/fenix/components/metrics/MetricsUtilsTest.kt ===================================== @@ -4,7 +4,6 @@ package org.mozilla.fenix.components.metrics -import com.google.android.gms.ads.identifier.AdvertisingIdClient import com.google.android.gms.common.GooglePlayServicesNotAvailableException import com.google.android.gms.common.GooglePlayServicesRepairableException import io.mockk.every @@ -13,6 +12,7 @@ import kotlinx.coroutines.test.runTest import org.junit.Assert.assertArrayEquals import org.junit.Assert.assertEquals import org.junit.Assert.assertNull +import org.junit.Ignore import org.junit.Test import java.io.IOException @@ -34,21 +34,18 @@ class MetricsUtilsTest { @Test fun `getAdvertisingID() returns null if the API returns null info`() { - val mockInfo: AdvertisingIdClient.Info = mockk() - every { mockInfo.id } returns null - - assertNull(MetricsUtils.getAdvertisingID { mockInfo.id }) + assertNull(MetricsUtils.getAdvertisingID { null }) } + @Ignore("tor-browser#40014: the Google Advertising ID is neutered, so getAdvertisingID() always returns null") @Test fun `getAdvertisingID() returns a valid string if the API returns a valid ID`() { val testId = "test-value-id" - val mockInfo: AdvertisingIdClient.Info = mockk() - every { mockInfo.id } returns testId - assertEquals(testId, MetricsUtils.getAdvertisingID({ mockInfo.id })) + assertEquals(testId, MetricsUtils.getAdvertisingID({ testId })) } + @Ignore("tor-browser#40014: getHashedIdentifier() derives from getAdvertisingID(), which always returns null") @Test fun `getHashedIdentifier() returns a hashed identifier`() = runTest { val testId = "test-value-id" ===================================== mobile/android/fenix/app/src/test/java/org/mozilla/fenix/components/toolbar/BrowserToolbarMiddlewareTest.kt ===================================== @@ -224,7 +224,7 @@ class BrowserToolbarMiddlewareTest { coEvery { bookmarksStorage.getBookmarksWithUrl(any()) } returns Result.success(listOf(mockk())) settings.shouldUseBottomToolbar = false settings.shouldUseExpandedToolbar = false - settings.isTabStripEnabled = false + // settings.isTabStripEnabled = false } @Test @@ -1266,7 +1266,7 @@ class BrowserToolbarMiddlewareTest { @Test fun `GIVEN on a small screen with tabstrip is disabled and not using the extended layout THEN don't show a share button as page end action`() { - settings.isTabStripEnabled = false + // settings.isTabStripEnabled = false settings.shouldUseExpandedToolbar = false val browserScreenStore = buildBrowserScreenStore() @@ -1278,7 +1278,7 @@ class BrowserToolbarMiddlewareTest { @Test fun `GIVEN on a wide screen with tabstrip is disabled THEN show a share button as page end action`() { - settings.isTabStripEnabled = false + // settings.isTabStripEnabled = false val browserScreenStore = buildBrowserScreenStore() val middleware = buildMiddleware( browserScreenStore = browserScreenStore, @@ -1292,7 +1292,7 @@ class BrowserToolbarMiddlewareTest { @Test fun `GIVEN on a large screen with tabstrip is enabled THEN don't show a share button as page end action`() { - settings.isTabStripEnabled = true + // settings.isTabStripEnabled = true val browserScreenStore = buildBrowserScreenStore() val middleware = buildMiddleware(appStore, browserScreenStore) val toolbarStore = buildStore(middleware) @@ -1302,7 +1302,7 @@ class BrowserToolbarMiddlewareTest { @Test fun `GIVEN the current tab shows a content page WHEN the share shortcut is clicked THEN record telemetry and start sharing the local resource`() = runTest(testDispatcher) { - settings.isTabStripEnabled = true + // settings.isTabStripEnabled = true settings.shouldUseExpandedToolbar = false settings.toolbarSimpleShortcutKey = ShortcutType.SHARE.value val browserScreenStore = buildBrowserScreenStore() @@ -1337,7 +1337,7 @@ class BrowserToolbarMiddlewareTest { @Test fun `GIVEN the current tab shows a remote PDF WHEN the share shortcut is clicked THEN record telemetry and start sharing the remote resource`() { - settings.isTabStripEnabled = true + // settings.isTabStripEnabled = true settings.shouldUseExpandedToolbar = false settings.toolbarSimpleShortcutKey = ShortcutType.SHARE.value val browserScreenStore = buildBrowserScreenStore() @@ -1382,7 +1382,7 @@ class BrowserToolbarMiddlewareTest { @Test fun `GIVEN the current tab shows a normal webpage WHEN the share shortcut is clicked THEN record telemetry and open the share dialog`() { - settings.isTabStripEnabled = true + // settings.isTabStripEnabled = true settings.shouldUseExpandedToolbar = false settings.toolbarSimpleShortcutKey = ShortcutType.SHARE.value settings.nativeShareSheetEnabled = false @@ -1430,7 +1430,7 @@ class BrowserToolbarMiddlewareTest { @Test fun `WHEN the share shortcut is clicked THEN the share use case is invoked with the current tab's details`() { - settings.isTabStripEnabled = true + // settings.isTabStripEnabled = true settings.shouldUseExpandedToolbar = false settings.toolbarSimpleShortcutKey = ShortcutType.SHARE.value @@ -1471,7 +1471,7 @@ class BrowserToolbarMiddlewareTest { @Test fun `GIVEN on a small width with tabstrip is enabled and not using the extended layout THEN don't show a share button as browser end action`() { settings.shouldUseExpandedToolbar = false - settings.isTabStripEnabled = true + // settings.isTabStripEnabled = true val browserScreenStore = buildBrowserScreenStore() val middleware = buildMiddleware( browserScreenStore = browserScreenStore, @@ -1491,7 +1491,7 @@ class BrowserToolbarMiddlewareTest { @Test fun `GIVEN expanded toolbar with tabstrip and tall window WHEN changing to short window THEN show new tab, tab counter and menu`() = runTest(testDispatcher) { - settings.isTabStripEnabled = true + // settings.isTabStripEnabled = true settings.shouldUseExpandedToolbar = true val browserScreenStore = buildBrowserScreenStore() var isWideScreen = false @@ -1526,7 +1526,7 @@ class BrowserToolbarMiddlewareTest { @Test fun `GIVEN on a wide window with tabstrip and extended layout enabled THEN don't show a share button as browser end action`() { - settings.isTabStripEnabled = true + // settings.isTabStripEnabled = true settings.shouldUseExpandedToolbar = true val browserScreenStore = buildBrowserScreenStore() @@ -1539,7 +1539,7 @@ class BrowserToolbarMiddlewareTest { @Test fun `WHEN cycling through tall window and wide window THEN update what end page actions should be shown`() { val appStore = AppStore() - settings.isTabStripEnabled = false + // settings.isTabStripEnabled = false settings.shouldUseExpandedToolbar = false val readerModeStatus: ReaderModeStatus = mockk(relaxed = true) { every { isAvailable } returns true @@ -3156,7 +3156,7 @@ class BrowserToolbarMiddlewareTest { @Test fun `GIVEN share shortcut is selected THEN update end page actions without share action`() = runTest(testDispatcher) { - settings.isTabStripEnabled = false + // settings.isTabStripEnabled = false settings.toolbarSimpleShortcutKey = ShortcutType.SHARE.value val browserScreenStore = buildBrowserScreenStore() val middleware = buildMiddleware( @@ -3353,7 +3353,7 @@ class BrowserToolbarMiddlewareTest { @Test fun `GIVEN simple toolbar use share shortcut AND wide window with tabstrip enabled WHEN initializing toolbar THEN only show one Share in end browser actions`() { - settings.isTabStripEnabled = true + // settings.isTabStripEnabled = true settings.toolbarSimpleShortcutKey = ShortcutType.SHARE.value val middleware = buildMiddleware( ===================================== mobile/android/fenix/app/src/test/java/org/mozilla/fenix/home/setup/store/ChecklistItemTest.kt ===================================== @@ -7,6 +7,7 @@ package org.mozilla.fenix.home.setup.store import androidx.annotation.StringRes import io.mockk.every import io.mockk.mockk +import mozilla.components.lib.crash.R as crashR import org.junit.Assert.assertEquals import org.junit.Test import org.mozilla.fenix.R @@ -149,7 +150,7 @@ class ChecklistItemTest { ChecklistItem.Task( type = ChecklistItem.Task.Type.SIGN_IN, title = R.string.setup_checklist_task_account_sync, - icon = R.drawable.ic_fx_accounts_avatar, + icon = crashR.drawable.mozac_lib_crash_notification, isCompleted = isCompleted, ), ) @@ -185,7 +186,7 @@ class ChecklistItemTest { ChecklistItem.Task( type = ChecklistItem.Task.Type.SIGN_IN, title = R.string.setup_checklist_task_account_sync, - icon = R.drawable.ic_fx_accounts_avatar, + icon = crashR.drawable.mozac_lib_crash_notification, isCompleted = isCompleted, ), ), @@ -258,7 +259,7 @@ class ChecklistItemTest { ChecklistItem.Task( type = ChecklistItem.Task.Type.SIGN_IN, title = R.string.setup_checklist_task_account_sync, - icon = R.drawable.ic_fx_accounts_avatar, + icon = crashR.drawable.mozac_lib_crash_notification, isCompleted = isCompleted, ), ), ===================================== mobile/android/fenix/app/src/test/java/org/mozilla/fenix/settings/quicksettings/protections/cookiebanners/DefaultCookieBannerDetailsControllerTest.kt ===================================== @@ -220,46 +220,7 @@ internal class DefaultCookieBannerDetailsControllerTest { } } - @Test - fun `GIVEN cookie banner mode is site not supported WHEN handleRequestSiteSupportPressed THEN request report site domain`() = - runTest(testDispatcher) { - val store = BrowserStore( - BrowserState( - customTabs = listOf( - createCustomTab( - url = "https://www.mozilla.org", - id = "mozilla", - ), - ), - ), - ) - every { testContext.components.core.store } returns store - coEvery { controller.getTabDomain(any()) } returns "mozilla.org" - every { protectionsStore.dispatch(any()) } returns mockk() - - val job = Pings.cookieBannerReportSite.testBeforeNextSubmit { - assertNotNull(CookieBanners.reportSiteDomain.testGetValue()) - assertEquals("mozilla.org", CookieBanners.reportSiteDomain.testGetValue()) - } - controller.handleRequestSiteSupportPressed() - testScheduler.advanceUntilIdle() - - job.join() - - assertNotNull(CookieBanners.reportDomainSiteButton.testGetValue()) - testScheduler.advanceUntilIdle() - coVerifyOrder { - protectionsStore.dispatch( - ProtectionsAction.RequestReportSiteDomain( - "mozilla.org", - ), - ) - protectionsStore.dispatch( - ProtectionsAction.UpdateCookieBannerMode( - cookieBannerUIMode = CookieBannerUIMode.REQUEST_UNSUPPORTED_SITE_SUBMITTED, - ), - ) - cookieBannersStorage.saveSiteDomain("mozilla.org") - } - } + // tor-browser#42089: the ability to submit site support requests was removed, along with + // handleRequestSiteSupportPressed(), ProtectionsAction.RequestReportSiteDomain and + // CookieBannerUIMode.REQUEST_UNSUPPORTED_SITE_SUBMITTED this test used to exercise. } ===================================== mobile/android/fenix/app/src/test/java/org/mozilla/fenix/tabstray/TabManagerCfrControllerTest.kt ===================================== @@ -100,7 +100,7 @@ class TabManagerCfrControllerTest { @Test fun `GIVEN an adjacent tab WHEN maybeMarkTabSwipeCfrReady is called THEN shouldShowTabSwipeCfr is set`() { settings.hasShownTabSwipeCFR = false - settings.isTabStripEnabled = false + // settings.isTabStripEnabled = false settings.isSwipeToolbarToSwitchTabsEnabled = true settings.shouldShowTabSwipeCFR = false val adjacentTab = createTab(id = "tab2", url = "") View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/compare/51b7760... -- View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/compare/51b7760... You're receiving this email because of your account on gitlab.torproject.org. Manage all notifications: https://gitlab.torproject.org/-/profile/notifications | Help: https://gitlab.torproject.org/help
participants (1)
-
brizental (@brizental)