1
0
Fork 0
Commit Graph

538 Commits (69a9aeebae193107ba122bf60e5b60386666d85b)

Author SHA1 Message Date
mcarare 4b74ff186b For #12565: Remove context from DeleteBrowsingDataController constructor 2020-07-29 17:46:43 +03:00
sraturi 537d95c04d for #11830 created class containing the logic for sending AllStartup telemetry logic
lint check

renamed the intentReceived telemetry to appOpenedAllSource

added comments

removed unused code

moved lifecycle process to AppAllSourceStartTelemetry

moved tracking event out of init function

lint fix

moved appAllStartTelemetry to components

added bit more info about the metrics

added the  onReceivedIntent metric back

minor fix

change discriptions based on the comments frm MR

wrote test cases for AppAllSourceStartTelemetry.kt

lint fix

test case to mock application going background

post rebase:

post rebase:

fixed nit from comments

fixed nit from comments

fixed nit from comments

lint fix

lint fix
2020-07-28 17:09:42 -07:00
Tiger Oakes 8d1bd10e6b Test paged history provider 2020-07-28 12:35:34 -07:00
Jonathan Almeida 239e3de5e9 For #12856: Add save to collections button to Tabs Tray
Using the ConcatAdapter, we're now able to insert multiple data sources
of information into one RecyclerView and preserve layout/scrolling in
addition to adding the 'Save to Collection' button.
2020-07-28 11:14:08 -07:00
Jeff Boek 46f010f247 For #2681 - Adds ability to bypass cache when reloading 2020-07-27 12:11:11 -07:00
Tiger Oakes d640f58316 For #12565 - Clean up controller and add tests 2020-07-27 10:40:09 -07:00
ekager e5e62fa79a For #6846: Added quick actions for nav bar in home 2020-07-27 13:28:28 -04:00
ekager 46511d6f8e For #10163 - Adds tab multiselect mode 2020-07-24 18:18:26 -04:00
Jonathan Almeida d15b8381a6 For #10925: Fix breaking APIs in tabs tray 2020-07-24 16:52:06 -04:00
Sawyer Blatz 9c56e1905b For #12793: Improve snackbars for tabs tray 2020-07-24 10:56:54 -07:00
Tiger Oakes d3a07e95c9 For #12565: Don't pass contest to SortingStrategy 2020-07-23 19:05:11 -04:00
Tiger Oakes 652af79e95
Migrate from Session.toTab to BrowserStore (#12221) 2020-07-23 12:27:39 -07:00
Tiger Oakes 9af167ba0a
Add tests for some classes in home/browser (#12837) 2020-07-23 11:17:52 -07:00
Tiger Oakes 0d77f761e9
Test sync adapter (#12810) 2020-07-23 11:16:11 -07:00
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
2020-07-23 09:12:22 -07:00
Tiger Oakes 8f5a37733d
Create ToolbarPosition enum (#12747) 2020-07-22 19:23:38 -07:00
Kainalu Hagiwara 921b16233b For #1048 - Add ability to view tab history by long-pressing the back or forward button. 2020-07-22 11:20:47 -07:00
Tiger Oakes d9357f1e32 For #12801 - Extra debug menu trigger, disable if already triggered 2020-07-22 19:28:48 +03:00
Jeff Boek 11e2137fab
For #12806 - Adds unit tests to cover `ToolbarView.update()` (#12807) 2020-07-21 14:34:07 -07:00
Tiger Oakes c08d375c18
Move settings in components (#12675) 2020-07-21 10:47:10 -07:00
Tiger Oakes 0abb2c4f8b Add tests for web push integration 2020-07-21 10:12:06 -07:00
Tiger Oakes e809df0858 Pass settings and metrics to CFR 2020-07-21 09:01:09 +03:00
Tiger Oakes 51937e73fc
Closes #10924 - Cleanup SavedLoginsAuthFragment (#10930) 2020-07-20 13:25:24 -07:00
Christian Sadilek 16b6776938 Update Android Components to 51.0.20200717190031 2020-07-17 19:32:02 -04:00
Tiger Oakes 13949d6968
Test migration classes (#12677) 2020-07-17 14:35:13 -07:00
Tiger Oakes 67fda80453
Add tests for login exceptions (#12681) 2020-07-17 14:25:45 -07:00
Tiger Oakes aa31eb0fa5
Fix failure in handleWhatsNewGetAnswersClicked (#12682) 2020-07-17 14:25:35 -07:00
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>
2020-07-17 15:13:18 -05:00
Tiger Oakes eed20b43b9
Test session control controller (#12652) 2020-07-17 13:07:01 -07:00
ekager e358f95eed For #12364 - Only show PWA prompt the third time a user visits installable site 2020-07-17 12:37:03 -04:00
Tiger Oakes ac3df6bc5e
Add tests for adapters in collections (#12649) 2020-07-17 09:04:16 -07:00
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
2020-07-16 17:08:04 -05:00
Tiger Oakes 4dd0c0f224
For #12457: Add MockK matcher for intents (#12612) 2020-07-16 15:05:01 -07:00
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.
2020-07-16 14:40:08 -05:00
Tiger Oakes 2d066d77ad
Add tests for sync, wifi, and push (#12581) 2020-07-16 12:25:38 -07:00
Tiger Oakes 2291fb07aa
For #12565: Add Locale settings tests & use activity (#12579) 2020-07-16 11:43:27 -07:00
Hakkı Kaan Çalışkan 057711e6fb No issue: Uncomment forgotten assert 2020-07-16 11:45:53 -04:00
James Hugman 22689a9ff5 Remove need to specify component names for new intents 2020-07-16 10:37:03 -04:00
James Hugman 98a33ea82b Changed home_* style links to urls_* to reflect that the destination is a set of links, rather than where the screen is 2020-07-16 10:37:03 -04:00
James Hugman 1629878a66 Add install_search_widget 2020-07-16 10:37:03 -04:00
James Hugman 709fedd4d7 Add unit tests for deep links 2020-07-16 10:37:03 -04:00
Tiger Oakes 6be39aebde
Add tests for StartupReportFullyDrawn (#12560) 2020-07-15 23:31:59 -07:00
Tiger Oakes d4bb432e24
Add helper for underlining text (#12520) 2020-07-15 22:38:46 -07:00
Tiger Oakes a0491b702e
Fix nav graph and theme tests (#12567) 2020-07-15 18:04:36 -07:00
Tiger Oakes d0e9f1f165
Update Kotlin dependency (#10806) 2020-07-15 18:02:58 -07:00
mcarare 4153c11ea8 For #12503: Add unit tests for permissions details view. 2020-07-15 10:04:40 -04:00
ekager 9ed85510ae For #7094 - Adds save login exceptions 2020-07-14 14:47:37 -04:00
Tiger Oakes 69020a1f26
For #12457 - Add MockK matcher for nav directions (#12262) 2020-07-14 10:39:23 -07:00
Tiger Oakes 1ff64cab67
Add tests for search (#12437) 2020-07-14 10:32:04 -07:00
Tiger Oakes e9fb1a61c7
Test viewholders in home.sessioncontrol (#12524) 2020-07-14 10:31:50 -07:00
Tiger Oakes c265a7089a
Fix Robolectric tests SDK version (#12464) 2020-07-10 17:21:10 -07:00
Michael Comella 9fa241fbb0 No issue - post: mock profiler object in DefaultTabTrayControllerTest.
Without this line, the tests fail when running the full suite (but not
this test in isolation, for some reason).
2020-07-10 16:43:06 -07:00
Grisha Kruglov 806f6031ae For #12433 - Allow synced tabs pull-to-refresh for non-critical account errors 2020-07-09 16:18:54 -07:00
Tiger Oakes c99a8f5cfa
Fixes #9832 - Change targetSdkVersion to Android 10 (#11014) 2020-07-09 10:50:51 -07:00
Sebastian Kaspari a2a7b11425 Issue #12311: BrowserToolbarController: Stop SessionFeature and release session from EngineView. 2020-07-09 12:36:56 -04:00
Christian Sadilek 216396d979 For #12353: URL copied to clipboard should not be extension/reader URL 2020-07-08 16:55:32 -04:00
Tiger Oakes 9ae1aa6f16 Add tests for exceptions 2020-07-08 15:52:37 -04:00
Tiger Oakes 67ce5ad5d9
Add tests for onboarding viewholders (#11522) 2020-07-08 07:53:22 -07:00
Tiger Oakes 720a590902
Add tests for browser helper classes (#12370) 2020-07-07 19:46:25 -07:00
Christian Sadilek 27c608d956 Update built-in extensions for new AC/GV API
New API (installBuiltIn/ensureBuiltin) requires
- Gecko IDs and new permissions
- Extension will only be re-installed if it has a new version

This includes a gradle task to automatically generate a
new version in manifest.json for every build so we don't
forget to update the version and end up with changes that
are never applied.
2020-07-07 18:41:12 -04:00
Tiger Oakes 8e8e5aea36
Extract radio group logic into helper (#11493) 2020-07-06 17:09:42 -07:00
ValentinTimisica 4a93a41bb2 For #11763: Fixes unit tests 2020-07-06 17:06:10 -04:00
Tiger Oakes 1ab5fe3eb9
Add method to test fragments in roboletric (#12261) 2020-07-06 13:04:43 -07:00
Tiger Oakes 41452e945b Move SearchProviderModel extension to class 2020-07-06 20:38:08 +03:00
Mugurell 0fb6bbc175 For #10401 - Hide Shortcuts if just one search engine is installed
Otherwise, the Shortcuts option which allows to choose with what search engines
to search would be redundant.
2020-07-06 14:36:04 +03:00
Sebastian Kaspari 388c144a62 SearchFragmentStore: Remove Session reference from state and read values from BrowserStore. 2020-07-03 21:01:59 +02:00
ekager f863c341e8 Updates AC to 49.0.20200702190156 and fixes breaking changes 2020-07-03 06:40:06 -04:00
Sawyer Blatz 306505fee0
No issue: Remove feature flag for tips (#12172) 2020-07-01 14:47:40 -07:00
Tiger Oakes 6bde0378a2
Add tests for StrictModeManager (#12013) 2020-06-29 08:17:07 -07:00
ekager 60069395eb Update AC to 48.0.20200627130132 and fix breaking changes 2020-06-27 20:11:31 -04:00
Jeff Boek b1a8c0f483 For #9935 - Use the searchengine deferred 2020-06-26 19:07:36 -07:00
Kate Glazko 2ac8496315 For #12025: Set Search Shortcuts Off By Default 2020-06-26 18:21:58 -07:00
Sawyer Blatz 8a08cb941e
For #11479: Record open tabs count in metrics ping (#12024) 2020-06-26 17:15:43 -07:00
Marc Leclair ff5d00362b Added A-C version 48.0.20200626213814 2020-06-26 19:59:57 -04:00
Tiger Oakes 7287b5579f
Test settings about/advanced (#12023) 2020-06-26 15:53:30 -07:00
Tiger Oakes bcb2ef10ac
Add tests for PhoneFeature (#12021) 2020-06-26 12:12:52 -07:00
Tiger Oakes 80de3851f3
Add tests for OnSharedPreferenceChangeListener (#12019) 2020-06-26 11:04:46 -07:00
Mihai Branescu 93247e0b2f For #9425 - SearchFragment now reacts to undo operation for base engines 2020-06-26 13:21:00 +03:00
Mihai Branescu 46c1c130da For #9425 - Handle undo for custom search engines
On undo, get the template that the user entered for that engine and then
re-add it to the `CustomSearchEngineStore`
2020-06-26 13:21:00 +03:00
person808 ad90625b48 For #2165 - Add swipe to refresh gesture to bookmarks view. 2020-06-25 14:50:24 -07:00
Christian Sadilek 64440409b0 For #9100: Follow-up to fix memory leak in NotificationSessionObserver
The observer was moved and is now bound to the activity and its
context. If the activity is re-created we leak the observer and
therefore the activity itself.

With this we make sure to stop the observer and also don't use
the activity context to begin with.
2020-06-25 16:17:38 -04:00
ekager c77ddd8d26 For #11866 - Update back press logic for SearchFragment 2020-06-25 14:40:31 -04:00
Christian Sadilek 7be56ce4fa For #11798: Allow sharing of reader view pages 2020-06-25 14:39:21 -04:00
Sawyer Blatz 2d65faf232
For #11392: Rename Installation ping to FirstSession (#11869) 2020-06-25 10:06:26 -07:00
Mihai Branescu 49b617c999
For #9100 - Private browsing notification fixes
Co-authored-by: Seef <Saif Dara>
2020-06-24 21:35:11 -04:00
Mihai Branescu 632b64971f For #10467 - removed unused tests and resources related to blue dot notification 2020-06-24 21:33:32 -04:00
Tiger Oakes 0b781ae3b7 Add tests for collection creation controller 2020-06-24 21:21:02 -04:00
Tiger Oakes 4415702fa8 Add tests for share sheet 2020-06-24 20:33:47 -04:00
Tiger Oakes 9a8b800a76 For #8621 - fix intermittent test failures 2020-06-23 17:43:24 -04:00
Jeff Boek 2861421312 For #11112 - Adds save tabs to collection button to the no collections message 2020-06-23 08:17:55 -07:00
Tiger Oakes ccb532bb77
For #11534 - Don't check lastUsed mode for screenshots (#11827) 2020-06-22 17:38:58 -07:00
Tiger Oakes 18cc4c95c1
Add tests for ContextKt (#11824)
Migrated from an old branch by Kate

Co-authored-by: Kate Glazko <katglazko@gmail.com>
2020-06-22 14:00:43 -07:00
ekager 635c30510d No issue: refactor tabs tray to use interactor/controller, add tests 2020-06-22 13:01:35 -04:00
Mugurell 0ba1d266b3 For #9144 - Ignore previous Intent if activity is started from Recents
We'll now clearly differentiate between cold / hot starts of HomeActivity.kt.
This is needed because Android will resend the original Intent which initially
started the Activity whenever it is restarted from the Recents Screen if the
activity is already destroyed at that time. So in the event that the activity
was before started with an Intent to open a webpage for example whenever the
activity is restarted from Recents it will receive the same Intent to open a
webpage even though that Intent has already been consumed.

Activity's onCreate() will only use the intent processors when the activity is
cold started so that we'll only initially act upon Intents configured for
different behaviors inside the app.
If the activity is destroyed while in background and opened from Recents it
will not act upon the original Intent which is now resent by Android.

Activity's onNewIntent() will be called to act upon a new Intent if the
activity is hot started since we are declared as singleTask and it now has the
responsibility to delegate various intent processors to consume that Intent.
2020-06-22 12:08:24 -04:00
Emily Kager 44ff29bdc0 Revert "For issue #9949 - Bookmarks/History deletion inconsistencies"
This reverts commit 3feab90b19.
2020-06-18 19:31:49 -04:00
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.
2020-06-17 14:42:51 -04:00
Tiger Oakes f6efb386d6 Add tests for addon details 2020-06-17 14:38:50 -04:00
Tiger Oakes d3d5c8934f Cleanup tests for toolbar controller 2020-06-15 15:25:33 -04:00
Jonathan Almeida e6da2bd910 Fix breaking APIs in TabsAdapter and ViewHolder 2020-06-13 16:02:31 -04:00
David Walsh 8b24cdec42
For 11428 - Focus on home screen address bar when tab tray new tab is tapped (#11429) 2020-06-12 17:55:07 -05:00