Commit Graph

59 Commits (9654b4dfb122b54b04369fe80a2f9c95811478e8)

Author SHA1 Message Date
Gabriel Luong 9654b4dfb1 For #27667 - Remove import-ordering from the list of disabled ktlint rules 2 years ago
Roger Yang e81da189cd Close #24498: Add test for history search telemetry 2 years ago
mcarare ffcef5ff2e For #26844: Fix ktlint issues and remove them from baseline. 2 years ago
mike a 8e4effe70a Revert "Closes #25967: add classes to support multiple viewHolders"
This reverts commit f910fcfe76.
2 years ago
mavduevskiy 40ef60ca87 Revert "Closes #25942: use HistoryFragment to show synced history"
This reverts commit 6483e1c647.
2 years ago
mike a 6483e1c647 Closes #25942: use HistoryFragment to show synced history 2 years ago
mike a 063a09782a Issue #26101: add telementry for deleting history time range 2 years ago
mike a 7982c6b79f Close #25954: add a new delete time range confirmation dialog for history screen 2 years ago
mike a f910fcfe76 Closes #25967: add classes to support multiple viewHolders 2 years ago
Roger Yang 22ac345513 Issue #24740: Use unified search bar in history search 2 years ago
Jan-Erik Rediger bbf2d427d2 Adjust all telemetry tests to follow new Glean APIs
These are mostly mechanical changes to replace usage of `testHasValue`
with `testGetValue`.
`testGetValue` will now return `null` instead of throwing an exception
if no data is available.
2 years ago
Mugurell fc2c1700c9 For #23876 - Update kotlinx-coroutines to 1.6.1. Refactor runBlocking in tests.
After the update `TestCoroutineDispatcher`, `TestCoroutineScope` and
`runBlockingTest` are deprecated.
Instead of these new `TestDispatcher`, `TestScope` and `runTest` APIs are used.

Took the oportunity to also replace most of the `runBlocking` calls with the
new `runTest` specially designed for running coroutines in tests API.
2 years ago
mcarare ffa1ecd300 For #21292: Remove unused MetricController parameters. 2 years ago
mike a a066dddce9 Closes #24513: add undo snackbar to history group screen 2 years ago
Alexandru2909 e571f0bb3a For #24498 - Remove Event.wrapper for History metrics 2 years ago
Roger Yang 7d8bad05cd Close #23694: Add telemetry for history search 2 years ago
Roger Yang 1e90235dcc Close #10046: Add history search 2 years ago
Roger Yang 829c06ebe4 Close #23250: Remove duplicate sites within a time period in history 2 years ago
Brais Gabín 7ec31a25c4 For #23142 - Fix license formatting in tests 2 years ago
Grisha Kruglov 5bbfd49e1d Refactor History types to eliminate nullability
This introduces a separate HistoryDB type at the PagedHistoryProvider
layer, that doesn't need to deal with positions. Positioning logic in
HistoryDataSource becomes a type conversion between the new type and an
existing History type that UI and ItemKeyedDataSource API is written against.

With this refactor, we entirely eliminate nullability from these types.
2 years ago
Grisha Kruglov 836ff1151b Closes #22764: Convert History.id to an Int position
We were converting Long timestamps into Ints (and getting negative
numbers back), and treating that as, basically, a position for the
paging API; the paging API would pass us back the obscure negative
number back as an offset, and we'll mishandle it resulting in an
infinite loop.

This patch removes all of the Long -> Int conversions, and introduces an
explicit 'position' that is calculated once we have a full page of
results completed.
2 years ago
Roger Yang 26198330e9 Closes #22671: Show correct time groups header in history 2 years ago
Sebastian Kaspari 170fa9705e Update Kotlin and Jetpack Compose versions. 3 years ago
Gabriel Luong 2ae7d5d593 For #20893 - Search term groups in history 3 years ago
Gabriel Luong e4a25f4123 For #21035 - Refactor HistoryViewInteractor from HistoryView into HistoryInteractor 3 years ago
Michael Comella c6a4d0afed Closes #20627: replace mocked lambda in HistoryItemMenuTest.
This will prevent intermittent failures with Java 11.
3 years ago
Sebastian Kaspari 971b419d77 Run ktlintFormat to adapt to latest formatting rules. 3 years ago
Christian Sadilek f03f7c6071 Closes #20533: Fix intermittent failures of HistoryControllerTest 3 years ago
Roger Yang 79cf3fc765
Closes #18253: Bookmark and History open new tabs in the background (#19275) 3 years ago
mcarare d233229ce4 For #15366: Add recently closed tabs metrics from history fragment. 4 years ago
ekager 9bb3440fce No issue: Make sure we are cleaning up test coroutines 4 years ago
Tiger Oakes a04b91ee3c
FNX-14513 ⁃ For #12862: Use concept-menu in library (#13332) 4 years ago
Mihai-Eduard Badea 1823fdb66d
For issue #9949 - Bookmarks/History deletion inconsistencies (#12630)
- Added the undo action for deleting individual history items by creating a new field to the history state containing the id's of the history items that are pending for deletion; This field is used inside the update function from the view to show/hide the items.

 - Added a new check inside the "deleteMulti" method from BookmarkFragment that calls the showRemoveFoldersDialog to prevent the user from being able to delete one or more bookmark folders without being asked for confirmation, as in #8648.

Co-authored-by: Mihai Eduard Badea <mihai.badea@softvision.ro>
4 years ago
Tiger Oakes a0491b702e
Fix nav graph and theme tests (#12567) 4 years ago
Tiger Oakes 69020a1f26
For #12457 - Add MockK matcher for nav directions (#12262) 4 years ago
Tiger Oakes c99a8f5cfa
Fixes #9832 - Change targetSdkVersion to Android 10 (#11014) 4 years ago
Emily Kager 44ff29bdc0 Revert "For issue #9949 - Bookmarks/History deletion inconsistencies"
This reverts commit 3feab90b19.
4 years ago
David Walsh 3feab90b19 For issue #9949 - Bookmarks/History deletion inconsistencies
- Added the undo action for deleting individual history items by creating a new field to the history state containing the id's of the history items that are pending for deletion; This field is used inside the update function from the view to show/hide the items.

 - Added a new check inside the "deleteMulti" method from BookmarkFragment that calls the showRemoveFoldersDialog to prevent the user from being able to delete one or more bookmark folders without being asked for confirmation, as in #8648.
4 years ago
person808 d14b39a56e For #2165 - Implement pull-to-refresh gesture to sync history. 4 years ago
Tiger Oakes f0295048fa Remove Mockito 4 years ago
Jeff Boek 4cbb9aebaf
Cleans up nav_graph.xml (#9829)
* For #9751 - Cleans up homeFragment directions

* For #9751 - Uses global actions for fragments not owned by homeFragment

* For #9751 - Cleans up SearchFragment directions

* For #9751 - Removes settings action from DeleteBrowsingDataFragment

* For #9751 - Removes browser action from SettingsFragment

* For #9751 - Adds ManagePhoneFeature global action

* For #9751 - Clean up unused deletebrowsingfragment actions

* For #9751 - Cleans Up HistoryFragment actions

* For #9751 - Removes Home -> Search action

* For #9751 - Removes the Bookmark -> Browser action

* For #9751 - Cleans up bookmark fragment actions

* For #9751 - Cleans up actions from ShareController

* For #9751 - Removes defaultBrowserFragment to browserFragment action

* For #9751 - Removes about -> browser action

* For #9751 - Adds global action to TrackingProtectionFragment

* For #9751 - Removes exception -> browser action

* For #9751 - Removes login -> browser action

* For #9751 - Fixes LoginFragment directions

* For #9751 - Removes ExternalAppBrowser directions

* for #9751 - Cleans up actions

* For #9751 - Fixes unit tests

* For #9751 - Addresses nits in PR
4 years ago
Michael Comella 376740cd2c For #9631: replace assertk assertions with junit.
I created a series of editor macros to do this with minimal errors (and
to do it quickly!).
4 years ago
Michael Comella 6e0d851da3 For #9605: replace unit test runners with FenixRobolectricTestRunner.
This is how we can apply the new test runner to remove duplication.

This commit was generated programmatically with the following commands:
```
  // Replace test runners with new one.
  find app/src/test -type f -exec gsed -i "s/@RunWith(RobolectricTestRunner::class)/@RunWith(FenixRobolectricTestRunner::class)/" {} +
  find app/src/test -type f -exec gsed -i "s/@RunWith(AndroidJUnit4::class)/@RunWith(FenixRobolectricTestRunner::class)/" {} +

  // Replace imports of old test runners with new one
  find app/src/test -type f -exec gsed -i "s/org.robolectric.RobolectricTestRunner/org.mozilla.fenix.helpers.FenixRobolectricTestRunner/" {} +
  find app/src/test -type f -exec gsed -i "s/androidx.test.ext.junit.runners.AndroidJUnit4/org.mozilla.fenix.helpers.FenixRobolectricTestRunner/" {} +

  // Remove unused imports
  find app/src/test -type f -exec gsed -i "/@Config(application = TestApplication::class)/d" {} +
  find app/src/test -type f -exec gsed -i "/import org.mozilla.fenix.TestApplication/d" {} +
  find app/src/test -type f -exec gsed -i "/import org.robolectric.annotation.Config/d" {} +
```

Where gsed is the GNU version of sed installed via homebrew. After
running these commands, I need to manually clean up the following files:
- FenixRobolectricTestRunner
- LocaleManagerExtensionTest
4 years ago
Mugurell 9f3bbf1fb7 For #8651 - Add HistoryInteractor/Controller unit/ui tests 4 years ago
Sebastian Kaspari 2723a55b03 Rename HistoryStore/State/Action to HistoryFragmentStore/State/Action. 5 years ago
Sourabh 091778a4b9 For #4398 - add HistoryController (#4837) 5 years ago
Jeff Boek e601fe7c9f For #4326 - Updates codebase to support latest version of ktlint 5 years ago
Tiger Oakes 3c1ce90f6f Fixes #2379 - Generic library selection 5 years ago
Jeff Boek e7ec6246fd For #4137 - Fixes HistoryStoreTest 5 years ago
Jeff Boek af449c84d5 For #4137 - Fixes HistoryInteractorTest 5 years ago