Commit Graph

229 Commits (a16ebd937e57ec76ff3c8b83eebedff6eabca0aa)

Author SHA1 Message Date
Jeffrey Starke 1bdda56989 [fenix] Consolidate duplicate mock initialization in intent processor tests. (https://github.com/mozilla-mobile/fenix/pull/6374)
* Consolidate duplicate code in intent processor tests

* Resolve ktlint errors
5 years ago
Tiger Oakes a752ecd79b [fenix] Split out CustomTabToolbarIntegration (https://github.com/mozilla-mobile/fenix/pull/7107) 5 years ago
Suraj Shah c634d89cd4 [fenix] For https://github.com/mozilla-mobile/fenix/issues/7048: Network info migration (https://github.com/mozilla-mobile/fenix/pull/7091)
* Fixes https://github.com/mozilla-mobile/fenix/issues/7048.
Adds extension function to check if online or not based on capabilities
Modified `buildDeviceList`
Modifies tests

* Fixing lint error for max length
Fixing test in AppRequestInterceptorTest.kt

* Adds suppression for deprecation
Moving away from using anko for ConnectivityManager instance

* Creates ConnectivityManager extension component

* Fixes https://github.com/mozilla-mobile/fenix/issues/7180
Refactors test cases to fix static mocks
5 years ago
Afzal Najam 9474fe12af [fenix] Hide add folder option when in Desktop Bookmarks folder 5 years ago
Ryan Kelly b806b4c5fa [fenix] Use feature-accounts-push, which replaces feature-sendtab. 5 years ago
ValentinTimisica f88065117a [fenix] For https://github.com/mozilla-mobile/fenix/issues/4776: Added Unit tests for About Page. 5 years ago
Mihai Branescu 6e2deeaadb [fenix] For https://github.com/mozilla-mobile/fenix/issues/6330 Collections Numbering (https://github.com/mozilla-mobile/fenix/pull/6453)
* For https://github.com/mozilla-mobile/fenix/issues/6330 - Added logic for getting the recommended default collection name

* For https://github.com/mozilla-mobile/fenix/issues/6330 - Added unit test for default collection number method
5 years ago
Tiger Oakes daf77820a4 [fenix] For https://github.com/mozilla-mobile/fenix/issues/5783 - Web Share with Fenix share sheet (https://github.com/mozilla-mobile/fenix/pull/6883) 5 years ago
Tiger Oakes 19b362d4fd [fenix] Extract IntentProcessorType to its own file and add tests (https://github.com/mozilla-mobile/fenix/pull/7012) 5 years ago
Severin Rudie bb5685cc4c [fenix] For https://github.com/mozilla-mobile/fenix/issues/4844: fix file prefix url shortening 5 years ago
Michael Comella 3b36ea34c8 [fenix] For perf-frontend-issueshttps://github.com/mozilla-mobile/fenix/pull/33: Add HotStartPerformanceMonitorTest.
We really don't want our startup tests to subtlely change so I thought
it was worth writing some quick tests.
5 years ago
Jeff Boek e0b335ed68 [fenix] For https://github.com/mozilla-mobile/fenix/issues/1607 - Passes "custom" as the search engine identifier for custom engines 5 years ago
Severin Rudie f838367e84 [fenix] No issue: small installedSearchEngineIdentifiers readability refactor 5 years ago
Severin Rudie 013aac2604 [fenix] No issue: tests installedSearchEngineIdentifiers 5 years ago
Severin Rudie a6bb6ad9ca [fenix] No issue: begin moving FenixSearchEngineProvider into a testing harness 5 years ago
Severin Rudie 53b4d6714e [fenix] For https://github.com/mozilla-mobile/fenix/issues/5334: added private custom tab processor (https://github.com/mozilla-mobile/fenix/pull/6845)
* For https://github.com/mozilla-mobile/fenix/issues/5334: added private custom tab processor

* For https://github.com/mozilla-mobile/fenix/issues/5334 - Fixes up IntentReceiverActivity for handling intents

* For 5334: update styling for private custom tabbs

* For 5334: update tests to account for new processors

Note that two are still failing. These appear to be true failures, and will be corrected in a later commit.

* For 5334: fixes bug introduced by changes to IntentReceiverActivity

RCA: intent className and extra were previously set based on which processors matched, not which successfully processed. This patch reintroduces that behavior.

* For 5334: add tests for custom tabs processing
5 years ago
Gabriel 9ed4f7f119 [fenix] For https://github.com/mozilla-mobile/fenix/issues/5574 - Migrate SessionControl to LibState (https://github.com/mozilla-mobile/fenix/pull/6651)
* For https://github.com/mozilla-mobile/fenix/issues/5574 - Part 1: Port TabAction.SaveTabGroup to TabSessionInteractor and SessionControlController. (https://github.com/mozilla-mobile/fenix/pull/6651)

- Introduces the TabSessionInteractor, SessionControlInteractor and SessionControlController classes.
- Removes the TabAction.SaveTabGroup.

* For https://github.com/mozilla-mobile/fenix/issues/5574 - Part 2: Port TabAction.PrivateBrowsingLearnMore to TabSessionInteractor and SessionControlController (https://github.com/mozilla-mobile/fenix/pull/6651)

* For https://github.com/mozilla-mobile/fenix/issues/5574 - Part 3: Port TabAction.ShareTabs to TabSessionInteractor and SessionControlController (https://github.com/mozilla-mobile/fenix/pull/6651)

* For https://github.com/mozilla-mobile/fenix/issues/5574 - Part 4: Remove unused TabAction.Share and TabItemMenu (https://github.com/mozilla-mobile/fenix/pull/6651)

In https://github.com/mozilla-mobile/fenix/issues/2205, the tab overflow button was removed which would have shown the
TabItemMenu when clicked. So, we can remove TabItemMenu since it is not
used and as a result, we can also remove TabAction.Share since there are
no consumers.

* For https://github.com/mozilla-mobile/fenix/issues/5574 - Part 5: Port TabAction.PlayMedia and TabAction.PauseMedia to TabSessionInteractor and SessionControlController (https://github.com/mozilla-mobile/fenix/pull/6651)

* For https://github.com/mozilla-mobile/fenix/issues/5574 - Part 6: Port TabAction.Select to TabSessionInteractor and SessionControlController (https://github.com/mozilla-mobile/fenix/pull/6651)

* For https://github.com/mozilla-mobile/fenix/issues/5574 - Part 7: Port Onboarding.Finish to OnboardingInteractor and SessionControlController (https://github.com/mozilla-mobile/fenix/pull/6651)

* For https://github.com/mozilla-mobile/fenix/issues/5574 - Part 8: Port TabAction.Close and TabAction.CloseAll to TabSessionInteractor and SessionControlController (https://github.com/mozilla-mobile/fenix/pull/6651)

- Removes TabAction

* For https://github.com/mozilla-mobile/fenix/issues/5574 - Part 9: Port CollectionAction.Delete to CollectionInteractor and SessionControlController (https://github.com/mozilla-mobile/fenix/pull/6651)

* For https://github.com/mozilla-mobile/fenix/issues/5574 - Part 10: Port CollectionAction.ShareTabs to CollectionInteractor and SessionControlController (https://github.com/mozilla-mobile/fenix/pull/6651)

* For https://github.com/mozilla-mobile/fenix/issues/5574 - Part 11: Port CollectionAction.AddTab and CollectionAction.Rename to CollectionInteractor and SessionControlController (https://github.com/mozilla-mobile/fenix/pull/6651)

* For https://github.com/mozilla-mobile/fenix/issues/5574 - Part 12: Port CollectionAction.RemoveTab to CollectionInteractor and SessionControlController (https://github.com/mozilla-mobile/fenix/pull/6651)

* For https://github.com/mozilla-mobile/fenix/issues/5574 - Part 13: Port CollectionAction.OpenTab to CollectionInteractor and SessionControlController (https://github.com/mozilla-mobile/fenix/pull/6651)

* For https://github.com/mozilla-mobile/fenix/issues/5574 - Part 14: Port CollectionAction.CloseTabs to CollectionInteractor and SessionControlController (https://github.com/mozilla-mobile/fenix/pull/6651)

* For https://github.com/mozilla-mobile/fenix/issues/5574 - Part 15: Introduce a HomeFragmentStore (https://github.com/mozilla-mobile/fenix/pull/6651)

- We will hook up the HomeFragmentStore in later parts.
- Removes List<Tab>.toSessionBundle(context: Context) since it is unused.

* For https://github.com/mozilla-mobile/fenix/issues/5574 - Part 16: Port CollectionAction.Collapse and CollectionAction.Expand to CollectionInteractor and SessionControlController (https://github.com/mozilla-mobile/fenix/pull/6651)

- We assume the store is hooked up to the SessionControlController in this part,
but this work will be done in a later part.
- Removes CollectionAction.

* For https://github.com/mozilla-mobile/fenix/issues/5574 - Part 20: Remove the architecture module. (https://github.com/mozilla-mobile/fenix/pull/6651)

* For https://github.com/mozilla-mobile/fenix/issues/5574 - Part 17:  Remove duplicate subscribeToTabCollections in BrowserFragment.kt (https://github.com/mozilla-mobile/fenix/pull/6651)

There is a duplicate call of subscribeToTabCollections() in both HomeFragment and BrowserFragment.
In this patch, we remove the call in BrowserFragment to avoid passing the HomeFragmentStore to
BrowserFragment in order to dispatch the CollectionsChange event.

* For https://github.com/mozilla-mobile/fenix/issues/5574 - Part 18: Delete SessionControlComponent and fix TabCollection and Tab imports (https://github.com/mozilla-mobile/fenix/pull/6651)

* For https://github.com/mozilla-mobile/fenix/issues/5574 - Part 19: Use the new HomeFragmentStore in the HomeFragment (https://github.com/mozilla-mobile/fenix/pull/6651)

- Renames SessionControlUIView to SessionControlView

* For https://github.com/mozilla-mobile/fenix/issues/5574 - Part 21: Fix white screen on home fragment (https://github.com/mozilla-mobile/fenix/pull/6651)

* For https://github.com/mozilla-mobile/fenix/issues/5574 - Part 22: Fix formatting in SessionControlInteractor and replace See with @see in SessionControlController (https://github.com/mozilla-mobile/fenix/pull/6651)

* For https://github.com/mozilla-mobile/fenix/issues/5574 - Part 23: Move to metrics.track call to the beginning of handleCollectionRemoveTab (https://github.com/mozilla-mobile/fenix/pull/6651)

This ensures that the metrics.track will be called immediately before the tab is removed from the collection.

* For https://github.com/mozilla-mobile/fenix/issues/5574 - Part 24: Use the sessionManager getter in SessionControlController (https://github.com/mozilla-mobile/fenix/pull/6651)

* For https://github.com/mozilla-mobile/fenix/issues/5574 - Part 25: Use mapNotNull in List<Tab>.toSessionBundle (https://github.com/mozilla-mobile/fenix/pull/6651)

* For https://github.com/mozilla-mobile/fenix/issues/5574 - Part 26: Simplify closeTab and closeAllTabs functions by assigning a deletionJob constant (https://github.com/mozilla-mobile/fenix/pull/6651)

* For https://github.com/mozilla-mobile/fenix/issues/5574 - Part 27: Replace listOf() with emptyList() in removeAllTabsWithUndo (https://github.com/mozilla-mobile/fenix/pull/6651)

* For https://github.com/mozilla-mobile/fenix/issues/5574 - Part 28: Replace the Context parameter with the HomeActivity in SessionControlController (https://github.com/mozilla-mobile/fenix/pull/6651)

* For https://github.com/mozilla-mobile/fenix/issues/5574 - Part 29: Add test for HomeFragmentStore, DefaultSessionControlController and SessionControlInteractor (https://github.com/mozilla-mobile/fenix/pull/6651)

* For https://github.com/mozilla-mobile/fenix/issues/5574 - Removes running CI against the architecture debug build varient
5 years ago
cesar 8a51b43fbc [fenix] test fixed 5 years ago
Gabriel Luong 30a1862f30 [fenix] For https://github.com/mozilla-mobile/fenix/issues/6857 - Replace BackHandler with UserInteractionHandler in InflationAwareFeature and InflationAwareFeatureTest 5 years ago
Tiger Oakes 35bf8dfc58 [fenix] Use ShareData with ShareFragment (https://github.com/mozilla-mobile/fenix/pull/6698) 5 years ago
Tiger Oakes 21ef894d5b [fenix] For https://github.com/mozilla-mobile/fenix/issues/6763 - Fix early view access 5 years ago
Daphne Liu 7be9a0aba7 [fenix] Switched to AC string extensions (https://github.com/mozilla-mobile/fenix/pull/6258)
* Switched to AC string extensions

* Clean up imports
5 years ago
Sebastian Kaspari 38e97e4f16 [fenix] Closes https://github.com/mozilla-mobile/fenix/issues/4982: Migrate Gecko files before initializing engine. (https://github.com/mozilla-mobile/fenix/pull/6738) 5 years ago
Pawel Obarzanek 57a08d269e [fenix] Closes mozilla-mobilehttps://github.com/mozilla-mobile/fenix/issues/5458 Tests for IntentReceiverActivity to verify outcoming intent (https://github.com/mozilla-mobile/fenix/pull/6130) 5 years ago
Pawel Obarzanek 6957b089ef [fenix] Closes mozilla-mobilehttps://github.com/mozilla-mobile/fenix/issues/4828 Initial tests for FragmentPreDrawMan… (https://github.com/mozilla-mobile/fenix/pull/6134)
* Closes mozilla-mobilehttps://github.com/mozilla-mobile/fenix/issues/4828 Initial tests for FragmentPreDrawManager

* Closes mozilla-mobilehttps://github.com/mozilla-mobile/fenix/issues/4828 verify if addOnPreDrawListener was called
5 years ago
mcarare 3f883d62b7 [fenix] For https://github.com/mozilla-mobile/fenix/issues/1019 Update unit tests and UI tests 5 years ago
Tiger Oakes f0969797aa [fenix] Extract TP onboarding popup (https://github.com/mozilla-mobile/fenix/pull/6700) 5 years ago
Jeff Boek 458dee5101 [fenix] No Issue - Fixes NPE in tests (https://github.com/mozilla-mobile/fenix/pull/6673) 5 years ago
Severin Rudie 1199424753 [fenix] 4844 fix url elision (https://github.com/mozilla-mobile/fenix/pull/6588)
* For https://github.com/mozilla-mobile/fenix/issues/4844: add test cases for url elision

* For 4844: implement toShortUrl to pass test cases

* For 4844: update plumbing to use toShortUrl

* For 4844: adds/handles suggested url elision test case
5 years ago
Patrick Martin 0ddba7a2f0 [fenix] For https://github.com/mozilla-mobile/fenix/issues/1695 - Detect HTML mime type for clipboard URL (https://github.com/mozilla-mobile/fenix/pull/6612)
* For https://github.com/mozilla-mobile/fenix/issues/1695 - Detect HTML mime type for clipboard URL
5 years ago
Tiger Oakes 037d35abd1 [fenix] Use ViewModel for share fragment 5 years ago
Tiger Oakes 47200b1308 [fenix] Fixes https://github.com/mozilla-mobile/fenix/issues/4528 - Prevent share menu from jumping
Plus a bunch of docs and refactoring
5 years ago
ekager 8f1e6a7ad0 [fenix] Add override for Core val in test 5 years ago
ekager fba098576f [fenix] Update BackgroundServicesTest 5 years ago
Emily Kager f279306478 [fenix] For https://github.com/mozilla-mobile/fenix/issues/5074 - Sync Logins, Uses KeySharedPreferences for Passwords Encryption Key 5 years ago
Arturo Mejia 2be3cb8bac [fenix] No issue: Do not prevent trackers duplication in the tracking
protection panel.
5 years ago
Severin Rudie 2e76d82c9a [fenix] 4281 remove qab (https://github.com/mozilla-mobile/fenix/pull/6310)
* For https://github.com/mozilla-mobile/fenix/issues/4281: small ToolbarMenu refactor

This makes it easier to see how items are ordered in the menuItems list

* For 4281: add QAB buttons to menu

* For 4281: removed menu back button per mocks

I double checked with UX, and we'll be relying on the hardware back button for its functionality

* For 4281: add content descriptions for bookmarking

* For 4281: updated BrowserToolbarController for new functionality

* For 4281: provided simple dependencies to browser controller

More complex changes will be in a following commit, for review readability

* For 4281: move toolbar controller dependencies up to BaseBrowserFragment

The functionality they control is being moved into the toolbar menu, which is shared by both normal tabs and custom ones

* For 4281: removed (now unused) code related to QAB

* For 4281: fix test compilation after QAB removal

Tests still need to be expanded to include added functionality

* For 4281: updated menu to show if url is bookmarked

This sloppy workaround is required because TwoStateButton requires that `isInPrimaryState` be a synchronous call, and checking whether or not the current site is bookmarked is quite slow (10-50 MS, in my tests).  After days of work and many attempted solutions, this was the least abhorrent among them.

https://github.com/mozilla-mobile/android-components/issues/4915 was opened against AC to evaluate potentially supporting async `isInPrimaryState` functions.
https://github.com/mozilla-mobile/fenix/issues/6370 was opened against Fenix to investigate the unexpectedly slow call to `BookmarkStorage`.

* For 4281: update reader mode switch

* For 4281: selectively show/hide menu items

* For 4281: add reader mode appearance

* For 4281: update bookmark button when it is clicked

* For 4281: removed unused QAB code

* For 4281: removed QAB robot, updated UI tests

* For 4281: removed QuickActionSheet metrics

Since this behavior now lives in the toolbar, it is tracked via Event.BrowserMenuItemTapped

* For 4281: fixed lint errors

* For 4281: add new strings for buttons added to menu

This is necessary because the location change (from QAB to toolbar menu) could affect the grammar in some languages

* For 4281: remove outdated TODOs

* For 4281: removed QAB container

* For 4281: removed back button reference from UI test

This button no longer exists

* For 4821: Fixes a visual defect (extra padding on top of toolbar)

* For 4281: update copy on reader mode

* For 4281: fixed review nits
5 years ago
mcarare bb6977c18c [fenix] For https://github.com/mozilla-mobile/fenix/issues/6323 Creating 1st collection from tab shows Name collection screen
Added a check for existence of at least a collection to select from.
5 years ago
Emily Kager afa25a6978 [fenix] For https://github.com/mozilla-mobile/fenix/issues/6354 - Removes ETP Experiment, Removes Feature Flags, Sets Strict Default 5 years ago
Grisha Kruglov 0ab4fb0e25 [fenix] For https://github.com/mozilla-mobile/fenix/issues/6490 - track abnormal FxA behaviour via Sentry 5 years ago
Emily Kager 517d32cca2 [fenix] Fix components, core tests 5 years ago
Emily Kager fc7084a555 [fenix] For https://github.com/mozilla-mobile/fenix/issues/5547 - Add top level auth when accessing passwords 5 years ago
Shangeeth Sivan 36274d1a89 [fenix] For https://github.com/mozilla-mobile/fenix/issues/4556: Removed redundant code in few tests. (https://github.com/mozilla-mobile/fenix/pull/6367)
* Moved some values as member variables as having them declared separately in methods seemed redundant.

* Added @Before method in logtest to avoid code duplication Fixes https://github.com/mozilla-mobile/fenix/issues/4556

* Added @Before method to FragmentTest class Fixes https://github.com/mozilla-mobile/fenix/issues/4556

* variable renamed and added private access specifier; removed set from member variable as it is used only once and we can convert the list to set when needed

* Fixes linter errors
5 years ago
ekager e709201056 [fenix] Use new API for ETP Exceptions 5 years ago
Mugurell c3936f8fc8 [fenix] For https://github.com/mozilla-mobile/fenix/issues/4126 - Add tests for the new classes resulting from refactoring
Used runBlocking to ensure we wait for the code using coroutines to execute
instead of runBlockingTest and join() since this last option led to failed
tests in CI because of
"java.lang.IllegalStateException: This job has not completed yet".
5 years ago
Tiger Oakes 41e1c322a6 [fenix] For https://github.com/mozilla-mobile/fenix/issues/6153 - Add powered by notification 5 years ago
Jeffrey Starke a1e82286b6 [fenix] * Move repeated NavControllerTest logic to @Before set up method
* Use property access syntax where applicable in NavControllerTest
5 years ago
Artur Dryomov aa2d47a591 [fenix] No issue: Refactor errors to risk level conversion. (https://github.com/mozilla-mobile/fenix/pull/5710) 5 years ago
Sawyer Blatz 506fdc79a8 [fenix] For https://github.com/mozilla-mobile/fenix/issues/4456: Adds total_uri_count to metrics core ping (https://github.com/mozilla-mobile/fenix/pull/6003) 5 years ago
Christian Sadilek b5ef6dbcfe [fenix] Closes https://github.com/mozilla-mobile/fenix/issues/5678: Selected session may render in ExternalAppBrowserActivity 5 years ago