Commit Graph

1295 Commits (1f633edd7d4436f20ead4ba657b1284b94cca0c6)

Author SHA1 Message Date
Christian Sadilek 75c70ff814 Closes #21952: Ignore intermittently failing FenixSnackbarKtTest 3 years ago
Christian Sadilek f4be38dafc Closes #21438: Ignore intermittently failing ExceptionsListItemViewHolderTest 3 years ago
Christian Sadilek 5d7bb70f55 Closes #22081: Ignore intermittently failing DefaultBrowsingModeManagerTest 3 years ago
Christian Sadilek 99f0aaa834 Closes #21332: Ignore intermittently failing WebPushEngineIntegrationTest 3 years ago
Christian Sadilek 3ffb11fd3b Closes #21952: Ignore intermittently failing FenixSnackbarDelegateTest 3 years ago
Arturo Mejia a2c7dfb26e For #22170: Add telemetry for the auto-close prompt 3 years ago
Grisha Kruglov 04a35c81b8 Closes #22083 - Match history groups to history pages by all items within the group
When deciding if we should include a history group within the "page of
history" results on the History View UI, we used to look at the most
recent timestamp of the metadata items within the group, and see if that
falls within the range of the timestamps of the history page, +/- some
buffer.

This assumes that each metadata entry will have a corresponding history
item. However, that's not true - when restarting the app, the selected
tab will be restored, and when opening History View right after we'll
record some metadata for it. However, we won't record a history visit
during the app restore for the selected tab.

That's all correct, but the assumption around group matching to history is now incorrect.

This patch changes the logic to instead look at every item within the
group, and see if any of them match the time window of the current
history page. This has a side-effect of also displaying search groups
multiple times on diffenent pages of history, if it makes sense to do so chronologically.
I think that's fine, it reflects reality at least (e.g. items within the
group may have been visited at very different points in time).

Co-authored-by: Christian Sadilek <christian.sadilek@gmail.com>
3 years ago
MickeyMoz a4bcecf8c5 Update Android Components version to 95.0.20211026143215.
Co-authored-by: Gabriel Luong <gabriel.luong@gmail.com>
3 years ago
Gabriel Luong b04bf99b7d For #21776 - Remove unused symbols 3 years ago
Gabriel Luong da395d1038 For #21776 - Local 'var' is never modified and can be declared as 'val' 3 years ago
Gabriel Luong 76c746b982 For #21776 - Remove unnecessary type argument 3 years ago
Gabriel Luong 272d31b2b4 For #21776 - Remove unnecessary parentheses from function call with lambda 3 years ago
Gabriel Luong 6d1d4bea93 For #21776 - Remove redundant qualifier name 3 years ago
Jonathan Almeida 7666f0e4c2 No issue: Replace TabsTray.Tab with TabSessionState
Co-authored-by: Arturo Mejia <arturomejiamarmol@gmail.com>
3 years ago
Jonathan Almeida b2a7877c83 No issue: Disable FenixSnackbarDelegateTest intermittents 3 years ago
Sebastian Kaspari 170fa9705e Update Kotlin and Jetpack Compose versions. 3 years ago
Mugurell acdde511d3 For #22070 - Prevent crash for when a selected topic does not exist anymore
The list of selected topics overwrites old data whenever user selects or
deselects another so the old selections will not leak for long.
3 years ago
Roger Yang 70fc6fc20f Close #22061: Let TabSorter decide if title header should be shown in tabs tray 3 years ago
Michael Comella a1ace964de No issue - post: fix ProfilerMarkerFactProcessor tests. 3 years ago
Gabriel Luong 64ca94b8fa For #22022 - Composify Customize Home Button and update the background color 3 years ago
Gabriel Luong 07a6a386f8 For #21753 - Refactor Pocket out of sessioncontrol 3 years ago
Noah Bond 826249497a
MR2 Inactive tabs telemetry (#21908)
* For #21903 - Added telemetry for interacting with inactive tabs

* For #21903 - Added missing inactive tab delete count event to delete all event

* For #21903 - Added PR numbers to metrics

* For #21903 - Updated broken unit tests. Resolved critical lint warning.

* For #21903 - Fixed inactive tabs setting toggle metric

* For #21903 - Updated FenixApp unit test

* For #21903 - Updated newline character in Metrics. Set inactive tab metrics' lifetime to default. Updated expiration to Nov 2022. Refactored inactive tabs metric to be a single metric.

* PR: addendum for last commit that missed a file

* For #21903 - Changed logic check for reporting inactive tab count

* PR: fixed merge conflict

* For #21903 - Removed tab close tracking when the user closes ALL inactive tabs

* For #21903 - Removed individual tab close metric verify from CLOSE ALL test

* For #21903 - Updated inactive tabs toggle setting expiration to match the expiration of the other events

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
3 years ago
Arturo Mejia 846aefc0f4 For #21723 Align the default value of the custom cookie setting with the UI 3 years ago
Roger Yang 60f7f766da Issue #21893: Keep search group when second to last search term tab is removed 3 years ago
Jonathan Almeida 625233f664 Close #21910: Fix intermittent failures in SelectTabUseCaseWrapperTest 3 years ago
Grisha Kruglov 0b5b1a738a Do less work while navigating Logins views
Fetching a set of logins from the store is quite expensive. This commit
avoids doing that while navigating back and forth between the list and
detail views:

- retain processes logins state when navigating into detail view
- use the `get` storage api to obtain specific login, instead of
  `list().filter {...}`
- avoid re-sorting retained logins when navigating back into the list
  view
3 years ago
Grisha Kruglov 97d93eb564 Make linters happy 3 years ago
Ben Dean-Kawamura 34ec442961 Updating Fenix to work with the new logins API
Switched to always using `Login` instead of the `SavedPassword` alias.

Made `MasterPasswordTipProvider.saveLogins()` call
`importLoginsAsync()`.  This is needed because it's the only method that
inputs a `Login` rather than a `LoginEntry`.

Moved the `SavedLoginsStorageController.kt.syncAndUpdateList` call
to inside `add()` and `update()`.  This simplifies the error handling a
bit.

Refactored dupe-checking code to use findLoginToUpdate()

Refactored `AddLoginFragment` / `EditLoginFragment` to put the username
error handling code all in 1 method.  I think it's easier to follow the
logic of showing/hiding the error labels when it's all in one place.
This fixes issues #24103 and #24104.  I would love to address #24102,
but I'm not sure what the correct behavior is there so I just kept that
the same.
3 years ago
Grisha Kruglov 2967513083 Fix up HistoryMetadataController tests 3 years ago
Grisha Kruglov 233f0a8a1d Closes #21871 - Eagerly update UI state after search group removal
Before this patch, this was the behavior - 'remove' button is clicked, we'd ask
the storage to remove metadata (on its IO thread), then navigate to Home
Screen.

This resulted in a race we could end-up on the Home Screen before delete
finishes, so the search groups do not appear to be removed (but,
refreshing the Home Screen again shows that they are removed).

This also resulted in an unnecessary navigation which felt very janky
(screen will "scroll" to the top) and was way more work than necessary.

After this patch, we:
 - dispatch two actions (on browserstore, on homefragmentstore) which
   remove the search groups from any relevant in-memory state; any UI bound to
   this state will be automatically "refreshed"
 - no longer navigate as part of the remove action, so the UI doesn't
   move and removal happens "in-place"
3 years ago
Christian Sadilek 88fbcc05b7 Handle new OptimizedLoadUrlAction in history metadata middleware
Upgrades to A-C 95.0.20211013154351
3 years ago
sunil9211 05d0bca6a3 For #17393: Dead code removed around Delete downloads 3 years ago
Arturo Mejia 08256ac68c For #21791 Adds tab auto-close prompt 3 years ago
Mugurell 79a4873843 For #21733 - Simplify test to not depend on store updates. 3 years ago
Mugurell 4d5bd9eca4 For #21733 - Replace mock of an interface with mock of a fake. 3 years ago
Jonathan Almeida 74fd043290 Issue #21686: Move submitList calls into TabsAdapter
Co-authored-by: Roger Yang <royang@mozilla.com>
3 years ago
Noah Bond 8c1a64a5e8 For #21773 - Updated "customize homepage" button to go to the new Homepage submenu in Settings 3 years ago
Mugurell 507801e5d5 For #21623 - Pocket recommended stories telemetry 3 years ago
Gabriel Luong 04e75ace19 For #21756 - Refactor TopSites out of home.sessioncontrol 3 years ago
Noah Bond 1f97ca6ce6
For #21437 - Relocated Home-related settings to its dedicated sub screen (#21722)
* For #21437 - Relocated Home-related settings to its dedicated sub screen

* For #21437 - Updated show top sites toggle text

* PR: Fixed lint warning. Reverted preference keys

* PR: added ignore for UI test

* PR: Added ignore for UI test
3 years ago
Arturo Mejia 7e3a2ba89d For #21574: disabled the homescreen onboarding dialog. 3 years ago
Jonathan Almeida 8c2cbb4e41 Issue #21642: Remove in-progress media tab from homescreen 3 years ago
Christian Sadilek 66e54860bb Move tabs out of search group if direct load occurs
This regressed in our previous fix that made sure child tabs don't
mistakenly get moved out of the group if their parent is navigated
away, or in case the child tabs are redirected.

However, when a subsequent load occurs in any tab in the group the
search terms need to be cleared and the tab removed from the group
to prevent false positives.
3 years ago
Mugurell 16a3b92d34 For #21593 - Refactor the coroutine from PocketStoriesShown to outside the middleware
In so this code will no longer have access to the MiddlewareContext which only
makes sense in the thread of the Middleware itself.
3 years ago
Mugurell e4489b8d7d For #21593 - Persist stories categories selections in a Proto DataStore
A fast and easy solution with all the ACID requirements.
Also supports easy migrations if later the data we need persisted changes.
3 years ago
Mugurell 565beb88c9 For #21593 - Refactor out "isSelected" from PocketRecommendedStoriesCategory
Having the list of categories and the list of selected categories separate in
State allows updating them independently.
3 years ago
Jonathan Almeida 061de54291 Issue #21576: Hide 'Other' title when there are no search groups 3 years ago
Arturo Mejia 2b363b9868 For #21618: Integrate Nimbus with MR2 Home Page to enable experimentation 3 years ago
Christian Sadilek 8f187af9ae Make search term grouping tolerant to (parent tab) navigation
Co-authored-by: Grisha Kruglov <gkruglov@mozilla.com>
3 years ago
Noah Bond aa28b6f142
For #21360 - Added toggle for search term tab groups (#21615)
* For #21360  - Added toggle for search term tab groups

* For #21360 - Lint cleanup

* PR: Added missing licenses and possibly fixed UI test

* PR: Added a "scrollTo" to potentially fix a UI test

* PR: Added potential fix for alwaysStartOnHomeTest

* PR: Added temporary ignore to alwaysStartOnHomeTest

* PR: added missing ignore comment

* For #21360 - Added missing feature flag driven visibility logic

Co-authored-by: Sebastian Kaspari <s.kaspari@gmail.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
3 years ago
Christian Sadilek fafa72c0ff Allow opening pocket stories when search dialog is active 3 years ago
Roger Yang 1092383231 No issue: Make sure jump back in group always have more than one tab 3 years ago
Gabriel Luong 15d1a0aa17 For #21551 - Add delete history metadata in the History view
Co-authored-by: Christian Sadilek <christian.sadilek@gmail.com>
3 years ago
Elise Richards c60de0bc6c For #21287: long press menu on recently visited homescreen groups 3 years ago
Grisha Kruglov 0d9e2b3a36 Do not show home screen behind search if we have search terms
Home screen isn't actually visible in case we're displaying awesomebar
search results. The navigation is thus unnecessary and actually causes visual
jankiness as we display home for a moment before covering it up with
search results.
3 years ago
Noah Bond 25d0696101
Inactive tabs changes (#21524)
* Issue mozilla-mobile#21319 - Moved inactive tabs to the top of the normal tabs tray.

* Issue mozilla-mobile#21319 - Added a delete icon to delete ALL inactive tabs.

* Issue mozilla-mobile#21319 - Changed default inactive time period to 14 days

* Issue mozilla-mobile#21319 - Hooked inactive tabs setting to UI code

Inactive tabs setting is also disabled when the user has selected the one day or week auto-close tab setting.

* Issue mozilla-mobile#21319 - File and Lint cleanup

* PR: Fixed bug causing grouped tabs to also show in "Other" when marked as inactive but inactive is OFF in Settings

* PR: Fixed lint warnings

* PR: Removed redundant feature check

* PR - Ignore test until search term tab groups switch is done
3 years ago
Mugurell 53d4336939 For #21592 - Don't topup with general stories 3 years ago
Michael Comella 4c33b1b75c For #21294: add partial test for existing factToEvent code.
When we refactor, this will help ensure we've done it correctly.
3 years ago
Mugurell e72b7f7cc8 For #21561 - Enable/Disable the feature from the customization menu 3 years ago
Mugurell 0c632dbbdb For #21391 - Final design composables
Fonts are not exactly following the Figma design but do better suit the overall
design since the other fonts are also not respecting the latest specs.
3 years ago
Mugurell c1f0e5a611 For #21275 - Sort items by how many times they were actually shown 3 years ago
Christian Sadilek 4596d4f905
Do not capture search terms when user navigates away via app (#21527)
Co-authored-by: Grisha Kruglov <gkruglov@mozilla.com>

Co-authored-by: Grisha Kruglov <gkruglov@mozilla.com>
3 years ago
Roger Yang 8a15e8a681 Close #21451: Add active search term tab groups on home 3 years ago
Arturo Mejia f15291757b For #21493 show onboarding dialog for home sections 3 years ago
Mugurell ba4c44afcf For #21045: Add categories support 3 years ago
codrut.topliceanu e8c332964d For #21087: Updates Recently Saved design 3 years ago
Christian Sadilek 54549c49ec Fix mapping between history visits and groups to use createdAt
We currently have a 15s buffer to match metadata to its corresponding
visit. However, a existing metadata record can be updated more than
15s after it was created e.g. when closing the tab and updating
the view time.
3 years ago
Jonathan Almeida 26dc3ea47e Issue #21366: Speculative fix for failing test in TitleHeaderBindingTest 3 years ago
Christian Sadilek d830006984 For #20893: Dedupe urls/site in history groups 3 years ago
Gabriel Luong 90d7927b2f Issue #21117 - Modify layout for items displayed under "Recently Visited" in the HomeScreen to follow latest UX designs 3 years ago
Gabriel Luong 98b218d964 For #21413 - Remove unused OnboardingPrivateBrowsingViewHolder and OnboardingWhatsNewViewHolder 3 years ago
Gabriel Luong d9847f9525 For #21408 - Pass the corresponding HistoryMetadataKey to openToBrowserAndLoad and addTab use case 3 years ago
Gabriel Luong 2ae7d5d593 For #20893 - Search term groups in history 3 years ago
Arturo Mejia 3272de1364 For #21239 add telemetry for Allow users to customize their home screen 3 years ago
Christian Sadilek 6f7f284b55 Make sure to only record view time once for a given tab access
Co-authored-by: Grisha Kruglov <gkruglov@mozilla.com>
3 years ago
Grisha Kruglov b7b8de1c2f Use UpdateUrlAction to record viewTime observations
We discovered that in a tab restore scenario we were recording view time
observations that were wrong - we'd record time deltas as-if user was
looking at the page while the browser wasn't running.

This happens because when we record a viewTime observation, we compare
current time with lastAccess time of the tab. In a restore scenario,
that lastAccess time happens to be from when the browser was last
running - which could be days ago.

The simplest solution was to not record a viewTime observation if the
url for a tab didn't change during a load event. To achieve this, we
needed to change which action we were using as a proxy for "navigation
events" - UpdateUrlAction contains the new url, allowing us to compare
against the current tab url.

Alternative solutions would be to keep using loading actions, but
dispatch a lastAccess event before performing a metadata update. This
would have worked, but would result in two lastAccess events being
dispatched for each navigation event instead of just one.
3 years ago
Elise Richards b56d8ff545 For #21337: rename recently saved section on home 3 years ago
Jonathan Almeida e9434a5b11 Close #21366: Fix intermittent test failure in TitleHeaderBindingTest 3 years ago
Michael Comella a3d3519e68 Closes #21335: return self instead of mock in FenixSnackbarKtTest.
This is a speculative fix for the intermittent issue. Typically, these
intermittents are caused by mocked lambdas but there is no mocked lambda
here. If this doesn't work, one `any()` argument fills in for a lambda:
it's possible that's causing the failure.

Unfortunately, I can't verify this fix easily because the "run test until
failure" option was removed from Android Studio.

See b3f5c87585 for a prior attempt to
address the intermittents in this class.
3 years ago
Jonathan Almeida bc7f5d80df Issue #21236: Fixes empty tray visibility logic
This is a bug we noticed after landing search term grouping.

An adapter can submit an empty list of items to the `ConcatAdapter`
early. This has the side-effect of triggering our `observeFirstInsert`
too soon and therefore updating the visibility to show the empty tray
placeholder and never switches back.

Our solution is to keep a constant observer on the adapter so we can
perform the visibility check on every insert/remove.

Co-authored-by: Roger Yang <royang@mozilla.com>
3 years ago
Sebastian Kaspari 6ac10d5209 Issue #21291: SearchDialogFragment: Get URL from clipboard once and not for every state update 3 years ago
Roger Yang fc18fd2520
For #21236: Separate tabs with the same search term into a different section (#21177)
* For #21236: Separate tabs with the same search term into a different section in tabs tray

* Issue #21236: Scroll to selected tab + various tab fixes for groupings

* Issue #21236: Fix failing test

Co-authored-by: Jonathan Almeida <jalmeida@mozilla.com>
3 years ago
Michael Comella 83bd2f2254 Closes #18102: remove intermittent failing App onCreate duration measurement test.
The test as it exists relies on the robolectric lifecycle, which is hard
to predict, so it doesn't seem worth fixing the test. Writing the test
any other way would require excessive mocking, which also seems
impractical.
3 years ago
Arturo Mejia 4e846b3cb6 For #21095 add customize home button on the home screen. 3 years ago
Gabriel Luong 66a31ddbfc Issue #21099 - Update items under "Jump back in" section to the latest designs 3 years ago
Christian Sadilek 2a92bd5942 Sort history metadata on home and allow limiting results 3 years ago
Elise Richards 52975b4f05 For #20654: Handle private mode switching from home behind search dialog.
Add tests for controller and interactor to handle private mode switches
3 years ago
Christian Sadilek c1289f657d Fix history metadata API breakage in unit tests 3 years ago
Arturo Mejia cbb8f808c1 For #18629: add support for SmartBlock exceptions 3 years ago
Arturo Mejia fe914dc964 For #21226 only show the "Customize Home" menu on home screen. 3 years ago
bendk 5ba47a90db
Handle breaking changes from a-s 83.0.0 (#21215) 3 years ago
Arturo Mejia d4a212f235 For #21095 allow users to configure their home screen. 3 years ago
Elise Richards 7d481a7836
For #19947: manually add login (#21199)
* [WIP] New Layout for adding login and 'add login' button in 'SavedLoginsListView' to launch it.
Fixed bindings.

* [WIP] Removed "reveal password" button

* [WIP] Added interactor for the add login screen

* [WIP] Trying to check for duplicates

* [WIP] Renaming "addNew..." with "add..."

* [WIP] Check for duplicates

* [WIP] Fixes after merge

* Cleaning up the layout and making edit text for hostname selectable

* Error handling on add login screen. Tests for interactors and controllers

Co-authored-by: Vitaly V. Pinchuk <vetal.978@gmail.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
3 years ago
Michael Comella 4fe6a4506d For #21183: remove lazyMonitored wrapper functionality.
We're not using the functionality so there's no sense in doing the work.
However, we keep the wrapper: see the code comments for details.
3 years ago
Arturo Mejia d288502840 For #20892 update connection panel strings 3 years ago
Noah Bond 28b07e7c8b
Issue mozilla-mobile#21140 - Updated recent tab logic to show media tab and second-to-last tab, if the media tab was the last active tab. (#21141)
* Issue mozilla-mobile#21140 - Updated recent tab logic to show media tab and second-to-last tab, if the media tab was the last active tab.

* Fixed RecentTabsListFeatureTest unit test

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
3 years ago
Roger Yang 5d22bb4707 Issue #18711: Telemetry for credit card autofill 3 years ago
Christian Sadilek 5cc5a3438c Remove mocked lambdas from AccountSettingsInteractorTest 3 years ago
Mickey Moz 4c30483c57
Update Android Components version (#21109)
* Update Android Components version to 93.0.20210901143120.

* For #21043 - Integrate AC changes

* Fix breaking API changes of RestoreAction

Co-authored-by: Mugurell <Mugurell@users.noreply.github.com>
Co-authored-by: Christian Sadilek <christian.sadilek@gmail.com>
3 years ago
Elise Richards 6cb872cd98 Remove banner open in app telemetry 3 years ago
Elise Richards 7653691d30 Remove private browsing shortcut telemetry 3 years ago
Elise Richards d137becd48 Remove tip telemetry 3 years ago
Elise Richards f1cf6f4651 Remove find in page telemetry 3 years ago
Elise Richards 1f94dfa59b Remove total uri count telemetry 3 years ago
Elise Richards 8455886ca8 Remove downloads misc telemetry. 3 years ago
Gabriel Luong e4a25f4123 For #21035 - Refactor HistoryViewInteractor from HistoryView into HistoryInteractor 3 years ago
Christian Sadilek 597b73c732 Dedupe history metadata in groups based on url 3 years ago
Elise Richards 41825022e7
For #19931: Add telemetry probes for recent bookmarks on home screen (#20316)
* Add telemetry probes for recent bookmarks on home screen. Tests for controller.

* Make the events into counters in the metrics ping

Update tests to reflect new metrics

Add data review link for new metrics

Mock new settings for startup metrics tests

Update metrics

Add test for recent bookmark glean events

* Recent bookmarks controller tests
3 years ago
Mugurell 09e8d34c26 For #20507 - Inactive tabs telemetry
Two new events are added:
- "inactive_tabs_expanded" for when the inactive tabs section is expanded
- "inactive_tabs_collapsed" for when the inactive tabs section is collapsed

For tracking when an inactive tab is opened / closed I've repurposed the
existing tabs tray telemetry (since the functionality uses the same code)
- tabs_tray.opened_existing_tab
- tabs_tray.closed_existing_tab
to support an extra "source" key indicating the feature from which a tab was
opened or closed. The current values for this new key are:
- "Tabs tray" for when a tab was opened/closed from tabs tray
- "Inactive tabs" for when a tab was openes/closed from the Inactive tabs
section of the tabs tray.
3 years ago
Mugurell 621c388c12 For #17917 - Finish migrating all synthetics usages 3 years ago
codrut.topliceanu 5e13ead750 For #20328 - Adds telemetry for recentlyClosed button
...from tabsTray, inactiveTabs section.
3 years ago
codrut.topliceanu 7070bb5607 For #17917: Use View binding in add-ons 3 years ago
mcarare 83b752afef For #20927: Replace icons with AC icons. 3 years ago
Rohan Maity 707918cdc1 For #20596 remove startup timeline probes 3 years ago
Jonathan Almeida 7915ef8f3f Close #20945: Fix failing test in AccountSettingsInteractorTest 3 years ago
Jonathan Almeida 693fbef88d Speculative fixes intermittent test in DeleteAndQuitTest 3 years ago
Arturo Mejia d3019986a4 For #20919 quit the after removing a study. 3 years ago
codrut.topliceanu bf5b4a5655 For #17917: Use View binding in tabs tray 3 years ago
Mugurell 69fa9abdd2 For #17917 - Migrate `home` from Kotlin synthetics to View Binding. 3 years ago
Mugurell ff4669a759 For #17917 - Migrate `browser` from Kotlin synthetics to View Binding. 3 years ago
codrut.topliceanu 34e063669a For #17917: Use View binding in Login Exceptions 3 years ago
Arturo Mejia 8b4190a429 For #20890 when TP is off globally hide TP section on quick settings. 3 years ago
Roger Yang c9b2f9e866 Issue #2783: Add snackbar to collection deletion 3 years ago
Jonathan Almeida ef036f3ca9 Issue #20864: Speculative fix for HomeFragmentTest failures 3 years ago
codrut.topliceanu 20c9a247f5 For #17917: Use View binding in tracking protection(2) 3 years ago
codrut.topliceanu c52b6615e5 For #17917: Use View binding in Share views 3 years ago
codrut.topliceanu 7acd6997f6 For #17917: Use View binding in Onboarding Tests 3 years ago
Jonathan Almeida 0090381663 Close #20796: Additional fixes for intermittent failing test
Fixes for TrackingProtectionExceptionsInteractorTest to remove the lamba
mocking and test actual BrowserState changes instead (where possible).
3 years ago
Arturo Mejia 512475df9e For #19886 integrate view binding. 3 years ago
Gabriel Luong d1b9744069 For #19886 - Add a back navigation to the Global Quick Settings from the Tracking Protection dialog 3 years ago
Arturo Mejia 34d99f89ac For #19886 - Improve quick setting dialogs navigation 3 years ago
Gabriel Luong 4b2b058b4e For #19886 - Remove tracking protection overlay CFR 3 years ago
Arturo Mejia 07bb1113f8 For #19886 - Add connection sub-menu. 3 years ago
Gabriel Luong 63368779df For #19886 - Add favicon to website info view
Co-authored-by: Arturo Mejia <arturomejiamarmol@gmail.com>
3 years ago
Gabriel Luong 61dfb40339 For #19886 - Handle toggling tracking protection in quick settings 3 years ago
Gabriel Luong 465f553ea8 For #19886 - Remove the tracking protection indicator 3 years ago
Jonathan Almeida bd665e2f7e Close #20853: Fix intermittent failing test in HomeFragmentStoreTest 3 years ago
Jonathan Almeida 5c328f9616 Close #15168: Remove intermittent failing test in ToolbarViewTest
This test seems to be hacking at the binding between Fenix and the
BrowserToolbar to simulate toolbar events passing to the Fenix
interactor.

This is rather clumsy test that relies on the magic working of mockk
instead of following a general unit testing strategy that would commonly
require the class to be re-written to allow for better testing instead.

It is far safer to remove this test since we are not guaranteeing
anything in it and instead we see intermittent failures that make us
lose more time.

So therefore.. 🔥
3 years ago
Jonathan Almeida 708f024d07 Close #20796: Fix intermittent test failure in TrackingProtectionExceptionsInteractorTest 3 years ago
Jonathan Almeida 0f35700e00 Close #20795: Speculative fix for intermittent test failures in HomeFragmentTest
The expectation is that replacing `return` with `answers` will compute
the return value for the extension function again in order to avoid the
error, "no answer found for: Settings".
3 years ago
Jonathan Almeida 0556e6b1c4 Close #20797: Fix intermittent test failures in ShortcutsSuggestionProviderTest 3 years ago
Jonathan Almeida 545a59ac97 Close #20792: Fix intermittent test failures in QuickSettingsFragmentReducerTest 3 years ago
Rohan Maity c45703db07 For #20596 remove perf.startup probes 3 years ago
Arturo Mejia 463728e007 For #20764 add screen for opting out of experiments 3 years ago
Arturo Mejia 71f1f6b88b Disable intermittent tests. 3 years ago
Vitaly V. Pinchuk 5093e7a5d6 Dismisses search dialog if active in (RecentTabsHeaderViewHolder, RecentBookmarksViewHolderTest) and adapts test for the changes. 3 years ago
Michael Comella cc380695b8 No issue: remove unnecessary robolectric annotations.
Theoretically, this should marginally decrease the duration of our unit
test suite. In my testing, for 1 iteration each (i.e. noise is very
possible), the duration changed from 9m 32s to 8m 21s – a 71s
improvement.

---

To identify tests that were running with robolectric that didn't need to
be, I removed the @RunWith(FenixRobo... from all relevant files:
    sed -i '' "/@RunWith(FenixRobolectric/d" app/src/test/**/*.kt

I ran the tests and discovered which ones failed from the Classes tab of
the index.html test result file. Something like:
    tests = document.querySelectorAll('table')[3].querySelectorAll('tr');
    failureElements = tests.querySelectorAll('.failures');
    // TODO: extract the test names

Then I copied these results to a text file and compared them to all the
files that had robolectric test runners to figure out which ones still
pass:
    comm -1 -2 failures.txt changed_files.txt > robolectric_not_needed.txt

And undid the changes to the failing files:
    for i in $(cat robolectric_not_needed.txt); do git checkout $i; done

Then I removed the import statements on those files:
    for i in $(cut changed_files.txt); do sed -i '' "/import.*RunWith/d" $i; done
    for i in $(cat changed_files.txt); do sed -i '' "/import.*RobolectricTestRunner/d" $i; done
3 years ago
Elise Richards 7fdad978a3
For FNXV2-17067: always show home in background behind search dialog (#20573)
* Navigate to home on toolbar click. Handle back press from search dialog

Update tests to show home behind search dialog. Remove unused test.

Jump back in show all button is clickable behind search dialog

Recently saved bookmarks show all button is clickable behind search dialog

* Add feature flag

* Past explorations show all button is clickable behind search dialog

Handle keyboard in controllers instead of viewholders. Update tests.

Allow collections to be visible behind search dialog

Dismiss keyboard and search dialog with navigateUp instead of just dismissing the keyboard

Verify navigateUp in tests

Adding ignore for flaky UI test

Only resize home behind search dialog

Add ignore for collection intermittent test

Cleanup
3 years ago
mcarare 55ccfda759 For #20425: Re-add tests for class BookmarksUseCaseTest. 3 years ago
Jonathan Almeida 8c975c6646 Close #20726: Fix intermittent failure in AddonsManagementViewTest 3 years ago
Michael Comella 4c6566a0d2 Closes #20697: replace mockked lambda in DownloadControllerTest.
This is expected to fix the intermittent failure in this test.
3 years ago
Christian Sadilek 01555c2bea
Update Android Components version to 92.0.20210806164329 (#20722)
Addresses breaking change in ShortcutsSuggestionProvider
3 years ago
Jonathan Almeida d6bc93981d Issue #20663: Make inactive card collapsible
We use make the inactive tabs section of the tabstray collapsible in
this change, with a technical quirk: we want to make the "isExpanded"
state of the tabs stay for the lifetime of the app and not the tabs
tray, but this functionality does not exist.

In this patch, we're storing the UI state in a singleton class that
exists for the lifetime of the app, but a more concrete solution is to
use an AppStore that holds content like this, which we can land in a
future patch.
3 years ago
Grisha Kruglov ec98db4e54 External source support
Adds handling of information about external referrer (package, category)
when dealing with external intents.
3 years ago
Roger Yang 2ac5a38120 Revert "For #18711: Telemetry for credit card autofill (#19548)"
This reverts commit e0b410efdf.
3 years ago
Roger Yang 2ed4115a6c Revert "For #18711 - Refactor credit card telemetry under the Metrics ping (#19733)"
This reverts commit 172a118a51.
3 years ago
Mugurell 3a33f65bc0 For #20584 - Speculative fix for ToolbarViewTest failing in CI
There was an `java.lang.InstantiationError: kotlin.jvm.functions.Function1`
stemming from line 75. See if avoiding nullability helps.
3 years ago
Jonathan Almeida ca51ac6168 Issue #20664: Do not consider newly created tabs as inactive 3 years ago
mcarare 066f9d7f5d For #20601: Use View binding in quick settings. 3 years ago
Christian Sadilek 56d4e7a72d Fix intermittent test failures in ToolbarViewTest 3 years ago
Roger Yang c55c252f9a Closes #20650: Revert to manually close tab as default setting 3 years ago
Arturo Mejia 525e5e7c25 For #20601: Undo Use View binding in quick Settings. 3 years ago
Michael Comella 9889f478ef Closes #20631: remove @Ignore on StorageStats tests.
The errors that caused this to be @Ignored were addressed by a recent PR
landing on master (i.e. the one that renewed the probes this test is
testing).
3 years ago
Sebastian Kaspari 8857a79ca8 Fix intermittent test failures in TabsTouchHelperTest 3 years ago
Sebastian Kaspari d0a63754c2 Fix intermittent test failures in DefaultBrowserToolbarControllerTest 3 years ago
Sebastian Kaspari ef3ef87ce2 Fix intermittent test failures in DefaultSessionControlControllerTest. 3 years ago
Michael Comella c6a4d0afed Closes #20627: replace mocked lambda in HistoryItemMenuTest.
This will prevent intermittent failures with Java 11.
3 years ago
Elise Richards 7fdade49ec
No issue: fix glean metrics tests for expired metrics (#20621)
* Remove references to preferences.open_links_in_private and preferences.private_search_suggestions in tests. These metrics have been expired and may be removed.

* Add ignores for performance metrics that have expired.

* Remove tabs_tray.cfr.dismiss and tabs_tray.cfr.go_to_settings telemetry probes.

* Remove metrics controller from signature and remove in tests
3 years ago
Jonathan Almeida 69d630f46c Issue #20349: Add inactive tab grouping to tabs tray 3 years ago
Christian Sadilek 6f3d21b48d Issue #20533: Fix intermittent test failures of DefaultCollectionCreationControllerTest 3 years ago
Christian Sadilek 1de7e22080 Issue #20533: Fix intermittent failures of DefaultSessionControlControllerTest 3 years ago
Sebastian Kaspari 51cec928b2 Fix intermittent test failures of ModeTest 3 years ago
Sebastian Kaspari 971b419d77 Run ktlintFormat to adapt to latest formatting rules. 3 years ago
Christian Sadilek 8fd409b721 Fix intermittent test failures of LoginExceptionFragmentStoreTest 3 years ago
Christian Sadilek 0cd08dc9b1 Issue #20533: Fix intermittent test failures of ExceptionsListItemViewHolderTest 3 years ago
Christian Sadilek 9d92e61ff4 Issue #20533: Fix intermittent test failures in SearchDialogControllerTest 3 years ago
Christian Sadilek 58e8cdfedb Issue #20533: Fix intermittent failures of DefaultTabsTrayControllerTest 3 years ago
mcarare cca7892e91 For #17917: Use View binding in settings screens. 3 years ago
mcarare 26e41be02e For #19955 #20393: Add telemetry for home screen recent tabs. 3 years ago
Christian Sadilek fbd9221c0c Fix intermittent test failures in WebPushEngineIntegrationTest 3 years ago
Christian Sadilek b3f5c87585 Fix intermittent test failures in FenixSnackbarKtTest 3 years ago
Christian Sadilek 30c890c457 Issue #20531: Fix intermittent test failures in DefaultQuickSettingsControllerTest 3 years ago
Christian Sadilek 2dde8c2388 Fix intermittent test failures in NavigationInteractorTest 3 years ago
Christian Sadilek 458e8b3cd7 Fix intermittent test failures in PagedHistoryProviderTest 3 years ago
Christian Sadilek b3895e5fde Fix intermittent test failures in TrackingProtectionExceptionsInteractorTest 3 years ago
Christian Sadilek d0c75740b7 Fix intermittent test failures in BookmarkControllerTest 3 years ago
Christian Sadilek f03f7c6071 Closes #20533: Fix intermittent failures of HistoryControllerTest 3 years ago
Sebastian Kaspari 41f21fc0f8 RemoveTabUseCaseWrapperTest: Do not mock lambdas. 3 years ago
Sebastian Kaspari 7859d4d681 DefaultRecentlyClosedControllerTest: Do not mock functions 3 years ago
Sebastian Kaspari 9ffd53ee04 Do not mock lambdas in TrackingProtectionPanelInteractorTest. 3 years ago
Christian Sadilek 2f27797530 Closes #20531: Fix intermittent failures of DefaultBrowserToolbarMenuControllerTest 3 years ago
codrut.topliceanu e2af42a497 For #20440 - Forces TopSitePager bind if no. of pages changed 3 years ago
Christian Sadilek 84fdf62240 Fix init order in TrackingProtectionExceptionsViewTest 3 years ago
Christian Sadilek 00d0ed53e0 Fix race condition in ShareViewModelTest 3 years ago
Christian Sadilek 9320700fd7 Remove unused imports in PwaOnboardingObserverTest.kt 3 years ago
Christian Sadilek 4d8d1b4ea2 Use MainCoroutineRule in PwaOnboardingObserverTest 3 years ago
Sebastian Kaspari 7840aac3ba Update Robolectric and mockk. 3 years ago
Sebastian Kaspari 8d8b6e6d36 Issue #19662: Use Java 11. 3 years ago
mcarare a5a4a7f6d9 For #20425: Update AC version 3 years ago
Mugurell 2c8c6d29ea For #20402 - Re-enable "in progress media tab"
The crash for when media starts playing in a custom tab is now resolved in AC.
3 years ago