Commit Graph

84 Commits (48ea10cd9d62ae924757a528656265f5805019f1)

Author SHA1 Message Date
ekager 09fbb43f80 For #2486 - Adds Recently Closed Tabs 4 years ago
Tiger Oakes 113241e8ce
Enforce IO thread inside of components (#14704)
* Automatically run PermissionStorage on IO thread

* Run TabCollectionStorage on dedicated scope + IO

* Update findSitePermissionsBy calls
4 years ago
Mugurell acdef76b71 For #12980 - Clear icons when deleting browsing data 4 years ago
Mugurell 75c496f237 For #13037 - Cleanup - have the camera check in just one place
This patch reverts a previous commit for the issue which added the camera check
in two places.
With a new solution to check if the device has camera only in
TurnOnSyncFragment we need to cleanup the previous checks.
4 years ago
Gilbert Gilb's 9430546d12 for #7584 - fix about libraries toolbar theme
fixes #7584 #13970
4 years ago
Gilbert Gilb's 2743c37b40 Add custom Activity to show libraries licenses.
As Google's library for showing licences isn't open-source, this commit
reimplements its main Activity. This is in prevision to having an OSS
flavor of fenix.

We chose to not introduce dependencies to third-party libraries
such as AboutLibraries for now, and we'll stick to using Google's gradle
plugin for the dependencies extraction.

Fixes #7584

See also #162
4 years ago
Tiger Oakes f3f470a977
For #13140: Use concept-menu for saved logins menu (#13143) 4 years ago
Mugurell ab2ea8e682 For #13037 - Use email to sign in to fxa if device has no camera
App can be installed on devices with no camera modules. Like Android TV boxes.
Will skip presenting the option to sign in by scanning a qr code in this case
and default to login with email and password.
4 years ago
Tiger Oakes 1a51b7f874 For #13084 - Use runBlockingTest 4 years ago
ekager 1497e4886e For #13084 - Update SavedLoginsStorageControllerTest 4 years ago
mcarare 048f6a49fe For #12565: Pass passwordsStorage instead of context in constructor. 4 years ago
mcarare 4b74ff186b For #12565: Remove context from DeleteBrowsingDataController constructor 4 years ago
Tiger Oakes d3a07e95c9 For #12565: Don't pass contest to SortingStrategy 4 years ago
Arturo Mejia 6530a45eb9
For issue #11676: Features phone that doesn't a site permission exception shouldn't be shown (#12855)
exception shouldn't be shown
4 years ago
Tiger Oakes d9357f1e32 For #12801 - Extra debug menu trigger, disable if already triggered 4 years ago
Tiger Oakes c08d375c18
Move settings in components (#12675) 4 years ago
Tiger Oakes 51937e73fc
Closes #10924 - Cleanup SavedLoginsAuthFragment (#10930) 4 years ago
Tiger Oakes eed20b43b9
Test session control controller (#12652) 4 years ago
Elise Richards 023a4983fa
For #10173: login duplicates and save (#11208)
* Extract controller into it's own class. Implement find dupes and filter based on username.

Create edit login controller. Add text watchers and check for duplicates.

Edit controller test

* Find duplicates and save to store

* Retrieve duplicates from AC and check list on username text changed

Move duplicates logic into the controller

* Add glean pings for delete and edit. Move logic for login manipulation into the datastore.

* Use correct threads in controller. Enable save button when applicable.

Save enabled in datastore.

Move login data to datastore

Rebase with password error states

Update metrics to be more specific for edit

* Create logins controller for AC calls

* Interactor and controller methods for edit login. Add edit view to separate out some layout manipulation.

Inflate view in edit fragment. Double layout showing up.

Edit view

Controller tests

Controller tests passing

Interactor tests

Lint and detekt cleanup

* Remove datastore and use storage controller for all logins calls to password storage.

Addressed comments

Lint
:

Rebase - 1
4 years ago
Tiger Oakes 4dd0c0f224
For #12457: Add MockK matcher for intents (#12612) 4 years ago
Mugurell e1fc0cc038
Ensure logins deletion (#12507)
* For #11227 - Cleanup saved logins list when one is selected

Selecting a saved login will open a detail screen for it from where users can
change details or even delete that particular login.
After the change is made the user is brought back to the list of saved logins
where for a brief moment (< 1s) until we get a new response from
passwordsStorage.list() the user can see and even interact with the old list
of items, which may still contain the just deleted one.

To avoid users seeing obsolete logins or even interacting with them (selecting
a previosuly deleted item will result in a crash) we will clean the list of
logins just before the selected login is opened in the detailed view.
When returning for a brief moment the users may see the "loading" UX until
passwordsStorage.list() returns the up-to-date list of logins to display.

* For #11227 - Refactor SavedLoginsView to be closer to MVI

- Interactors should only get passed other Interactors or Controllers as
dependencies to which they should delegate user actions.
- Controllers should hold most of the business logic and get passed all final
dependencies they need to do their job.
4 years ago
Tiger Oakes 2291fb07aa
For #12565: Add Locale settings tests & use activity (#12579) 4 years ago
Tiger Oakes d0e9f1f165
Update Kotlin dependency (#10806) 4 years ago
Tiger Oakes 69020a1f26
For #12457 - Add MockK matcher for nav directions (#12262) 4 years ago
Tiger Oakes 7287b5579f
Test settings about/advanced (#12023) 4 years ago
Tiger Oakes bcb2ef10ac
Add tests for PhoneFeature (#12021) 4 years ago
Tiger Oakes 80de3851f3
Add tests for OnSharedPreferenceChangeListener (#12019) 4 years ago
Tiger Oakes 9a8b800a76 For #8621 - fix intermittent test failures 4 years ago
Tiger Oakes 2fdebada11 Add tests for about viewholder 4 years ago
Tiger Oakes 294f29768d Test logins settings 4 years ago
Tiger Oakes 0d4ceb186c Add test for SearchStringValidator 4 years ago
Tiger Oakes f0295048fa Remove Mockito 4 years ago
Tiger Oakes 1a19b06227
Simplify `PhoneFeature` code (#10810) 4 years ago
Dennis Schubert d046d908fc Bug 1643132 - Remove native "Report site issue" functionality.
This will be replaced by the WebCompat team's system extension that ships as an android-component.
4 years ago
Tiger Oakes 2397695fe5
For #10596 - Redirect moz://a URL (#10688) 4 years ago
Elise Richards edc75c3ad0
Fixes #9504: Edit logins (#9693)
* Create editable view and fragment. Update login info page to display options menu with edit and delete.

* Create feature flag for edit. Check flag in the login detail fragment and default to just delete.

* Add three-dot kebab options menu in login detail fragment. Add title to the login item.

* Nav to and from edit view on save and back pressed.

* Save login through AC login manager. Clear text in editable field on button click.

* Match colors, fonts, dimens to UX specs for edit logins. Enable password reveal/hide and clearing text fields.

* Refactoring logins fragments. Using component Login object for consistency.

Fetch login list when saved logins are opened. Fetch login details when detail view is opened.

Revert "Fetch login list when saved logins are opened. Fetch login details when detail view is opened."

This reverts commit 44fe17166c3332b330229258b2e8982832672e3b.

* Using parcelable login and Login component class to pass ids and items between fragments

* Retrieve login from storage when viewing login details.

Rename login logic for consistency.

Ktlint cleanup

Fix nits and naming consistency.

* UX consistency for login detail and edit login pages

* Rebasing with logins sort - updating logins store.

* Rebasing with logins sort - merging fragments and controllers.

* Lint and removing unused files.

* UX cleanup.

* Update string description
4 years ago
ValentinTimisica 77705d1a27 For #9505: Adds tests for sort saved logins 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
Michael Comella 392dda5eda For #9605: remove unnecessary @RunWith(Robolectric in unit tests.
robolectric increases the run time of tests so it's important to remove
them when they're unnecessary.

Between this change and the last one, the unit test runtime was reduced
by ~10s.
4 years ago
Michael Comella f2acef66b5 For #9605: remove unnecessary @RunWith(AndroidJUnit4) in unit tests.
In unit tests, this annotation annotations defer to robolectric, non-trivially
increasing test runtime so it's important to remove them when they're
unnecessary.
4 years ago
Amaan Marfatia 3dcfed3761 AboutPageAdapter doesn't use notifyDataSetChanged()
We make the AboutPageAdapter inherit from a ListAdapter so that we don't use notifyDataSetChanged().
4 years ago
Severin Rudie 35a132d7ff
8017 advanced autoplay controls. (#8978)
* For #8017: add advanced autoplay controls
4 years ago
Arturo Mejia 7dff584b82 Remove @ObsoleteCoroutinesApi from tests 4 years ago
ekager e2bfe8d0db For #8621 - Disable failing handlePermissionsChange test 4 years ago
Severin Rudie 69c6de7cd4
For #8411: integrate AC permissions changes (#8618) 4 years ago
Mihai Adrian 4be693255d
For #8565: Fix updating dropdown preferences in ETP settings! (#8573)
* For #8565: Create custom SharedPreferenceUpdater for String Preferences

* For #8565: Use custom updater to correctly update DropDownPreference

* For #8565: Set default values for dropDown preferences

* For 8565: add tests for findEntriesValue

* For 8565: clarified findEntryValue

Co-authored-by: Severin Rudie <Baron-Severin@users.noreply.github.com>
4 years ago
ekager 37b50e08ea No issue: Disable two intermittent failing tests 4 years ago
Mihai Branescu 9d972fa1d0 For #4231 added unit tests for most recent apps 4 years ago
Emily Kager 2264e6e1b1 For #6623 - Adds ability to delete a login 4 years ago