1
0
Fork 0
Commit Graph

90 Commits (020608275de6c43e31b920b5fff07ca0ab651344)

Author SHA1 Message Date
Jeff Boek 020608275d For #6981 - Fixes tests to support locale aware changes 2020-02-18 18:20:50 -08:00
Jeff Boek c1f0e7bb33 For #3869 - Fixes unit tests 2020-02-18 10:10:16 -08:00
Jeff Boek 7aeb5f072d For #7295 - Adds more documentation for the installation metrics 2020-02-14 20:56:49 -08:00
codrut.topliceanu d6ae3d4abe For #7295 - Adds new custom ping: 'installation' 2020-02-14 20:56:49 -08:00
Simon Chae 2c01022c4b For #8153: Allow web-ext to open new tabs in correct browsing mode 2020-02-12 13:41:16 -08:00
Emily Kager 9e4e23eceb
Closes #8176 - Adds new string for add to top sites (#8209) 2020-02-07 22:05:35 -05:00
Gabriel Luong 64a4a7f422
Provide add-on support (#8064)
Closes #5630, #6069, #6092, #6091, #6124, and #6147.

Co-authored-by: Simon Chae <chaesmn@gmail.com>
Co-authored-by: Arturo Mejia <arturomejiamarmol@gmail.com>
Co-authored-by: Christian Sadilek <christian.sadilek@gmail.com>
Co-authored-by: Gabriel Luong <gabriel.luong@gmail.com>
2020-02-04 01:41:51 -05:00
Gabriel Luong e1863dd3c2 For #6758 - Part 4: Implement "Add to Firefox Home" browser menu item
- The "Add to Firefox Home" browser menu item adds a top site to the top site storage.
- Refactors the FenixSnackbar from BaseBrowserFragment into BrowserToolbarController
since there are multiple menu items that need to show a FenixSnackbar.
- Adds metrics for the new browser menu item.
2020-01-24 15:18:25 -08:00
ValentinTimisica 981d19de13 For #6556: Adds Telemetry counts for Search Access Points
Added two new sources to be counted ('widget' and 'shortcut') besides 'action' and
'suggestion'. Also modified/fixed some tests.
2020-01-16 10:23:48 +02:00
Colin Lee 7baf54f566
For #5182: Loading experiments on startup is slow, remove Fretboard (#7510)
This removes Fretboard. The goal is to reduce cold startup costs associated with loading the experiments on the main thread. We currently have two experiments frameworks in use and should only require one.
2020-01-13 12:38:32 -06:00
Jonathan Almeida 0768fde945 No issue: Use SendTabFeature and FxaPushSupportFeature 2020-01-03 10:20:53 -05:00
Tiger Oakes 3f7205e3cb
Extract IntentProcessorType to its own file and add tests (#7012) 2019-12-10 00:02:23 -08:00
Jeff Boek 45c6e3a784 For #1607 - Passes "custom" as the search engine identifier for custom engines 2019-12-09 11:47:05 -08:00
Severin Rudie dfea877fb7 No issue: small installedSearchEngineIdentifiers readability refactor 2019-12-09 10:58:19 -08:00
Severin Rudie 2aa80eff95 No issue: tests installedSearchEngineIdentifiers 2019-12-09 10:58:19 -08:00
Severin Rudie d3ff98816d No issue: begin moving FenixSearchEngineProvider into a testing harness 2019-12-09 10:58:19 -08:00
Severin Rudie 5f393bd5d4
For #5334: added private custom tab processor (#6845)
* For #5334: added private custom tab processor

* For #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
2019-12-06 10:57:54 -08:00
Gabriel 56b21426eb
For #5574 - Migrate SessionControl to LibState (#6651)
* For #5574 - Part 1: Port TabAction.SaveTabGroup to TabSessionInteractor and SessionControlController. (#6651)

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

* For #5574 - Part 2: Port TabAction.PrivateBrowsingLearnMore to TabSessionInteractor and SessionControlController (#6651)

* For #5574 - Part 3: Port TabAction.ShareTabs to TabSessionInteractor and SessionControlController (#6651)

* For #5574 - Part 4: Remove unused TabAction.Share and TabItemMenu (#6651)

In #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 #5574 - Part 5: Port TabAction.PlayMedia and TabAction.PauseMedia to TabSessionInteractor and SessionControlController (#6651)

* For #5574 - Part 6: Port TabAction.Select to TabSessionInteractor and SessionControlController (#6651)

* For #5574 - Part 7: Port Onboarding.Finish to OnboardingInteractor and SessionControlController (#6651)

* For #5574 - Part 8: Port TabAction.Close and TabAction.CloseAll to TabSessionInteractor and SessionControlController (#6651)

- Removes TabAction

* For #5574 - Part 9: Port CollectionAction.Delete to CollectionInteractor and SessionControlController (#6651)

* For #5574 - Part 10: Port CollectionAction.ShareTabs to CollectionInteractor and SessionControlController (#6651)

* For #5574 - Part 11: Port CollectionAction.AddTab and CollectionAction.Rename to CollectionInteractor and SessionControlController (#6651)

* For #5574 - Part 12: Port CollectionAction.RemoveTab to CollectionInteractor and SessionControlController (#6651)

* For #5574 - Part 13: Port CollectionAction.OpenTab to CollectionInteractor and SessionControlController (#6651)

* For #5574 - Part 14: Port CollectionAction.CloseTabs to CollectionInteractor and SessionControlController (#6651)

* For #5574 - Part 15: Introduce a HomeFragmentStore (#6651)

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

* For #5574 - Part 16: Port CollectionAction.Collapse and CollectionAction.Expand to CollectionInteractor and SessionControlController (#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 #5574 - Part 20: Remove the architecture module. (#6651)

* For #5574 - Part 17:  Remove duplicate subscribeToTabCollections in BrowserFragment.kt (#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 #5574 - Part 18: Delete SessionControlComponent and fix TabCollection and Tab imports (#6651)

* For #5574 - Part 19: Use the new HomeFragmentStore in the HomeFragment (#6651)

- Renames SessionControlUIView to SessionControlView

* For #5574 - Part 21: Fix white screen on home fragment (#6651)

* For #5574 - Part 22: Fix formatting in SessionControlInteractor and replace See with @see in SessionControlController (#6651)

* For #5574 - Part 23: Move to metrics.track call to the beginning of handleCollectionRemoveTab (#6651)

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

* For #5574 - Part 24: Use the sessionManager getter in SessionControlController (#6651)

* For #5574 - Part 25: Use mapNotNull in List<Tab>.toSessionBundle (#6651)

* For #5574 - Part 26: Simplify closeTab and closeAllTabs functions by assigning a deletionJob constant (#6651)

* For #5574 - Part 27: Replace listOf() with emptyList() in removeAllTabsWithUndo (#6651)

* For #5574 - Part 28: Replace the Context parameter with the HomeActivity in SessionControlController (#6651)

* For #5574 - Part 29: Add test for HomeFragmentStore, DefaultSessionControlController and SessionControlInteractor (#6651)

* For #5574 - Removes running CI against the architecture debug build varient
2019-12-04 22:06:05 -05:00
Gabriel Luong 85111f538a For #6857 - Replace BackHandler with UserInteractionHandler in InflationAwareFeature and InflationAwareFeatureTest 2019-11-28 15:58:07 -05:00
Tiger Oakes 7e8f079269
Use ShareData with ShareFragment (#6698) 2019-11-25 11:07:21 -08:00
ekager d85ed27a3d Add override for Core val in test 2019-11-14 16:05:20 -08:00
ekager 6e907b1106 Update BackgroundServicesTest 2019-11-14 16:05:20 -08:00
Emily Kager c43f96096e For #5074 - Sync Logins, Uses KeySharedPreferences for Passwords Encryption Key 2019-11-14 16:05:20 -08:00
Severin Rudie 6909a76bcb
4281 remove qab (#6310)
* For #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
2019-11-11 17:10:14 -08:00
mcarare 11ad1010a9 For #6323 Creating 1st collection from tab shows Name collection screen
Added a check for existence of at least a collection to select from.
2019-11-11 14:36:55 -08:00
Grisha Kruglov 40047315c2 For #6490 - track abnormal FxA behaviour via Sentry 2019-11-07 15:11:41 -08:00
Emily Kager b1623cbba6 Fix components, core tests 2019-11-07 14:50:24 -08:00
Severin Rudie aa8642f534
#4596 migrate collections (#5911)
* For #4596: move code from CollectionCreationComponent to CollectionCreationStore

Other than adding comments, no changes were made. The code will be updated in a following commit. This is in order to make the commit diff more readable.

* For 4596: update CollectionCreateStore to libstate

* For 4596: copied CollectionCreationUIView into CollectionCreationView

Otherwise, no code was changed. The next commit will update this code. This is in order to make the commit diff more readable.

* For 4596: update CollectionCreationView to LibState

Note that the minimal changes possible to enable migration were made.  Refactoring will happen in a later commit.

* For 4596: updated CollectionCreationTabListAdapter to work with the new View

* For 4596: updated SaveCollectionListAdapter to work with the new View

* For 4596: implemented CollectionCreationController

For now, it has an identical interface to the interactor. In a later commit several of its responsibilities will be moved around, some to the interactor and some to the reducer

* For 4596: copied over previous reducer code

No other changes were made. The code will be updated in the following commit. This is done to make changes more readable for the reviewer

* For 4596: update reducer code param names

Otherwise, no changes at this time

* For 4596: add arguments to CreateCollectionFragment in nav_graph

These will be used to replace the current CreateCollectionViewModel, which shares data between fragments in a way that doesn't fit within our architecture.

* For 4596: pass arguments to collection via transaction instead of VM

The VM will be removed in a later commit

* For 4596: update BrowserToolbarController to share state to collection via its Direction

* For 4596: removed CreateCollectionViewModel

* For 4596: test tab retrieval in CreateCollectionFragment

* For 4596: fix crashing CreateCollectionFragmentTest

* For 4596: removed classes create collection classes used by old architecture

* For 4596: collection interactor rename + kdoc

* For 4596: moved collection interactor interface

* For 4596: renamed CreateCollectionFragment

All related classes followed the pattern of CollectionCreationX

* For 4596: kdoc CollectionCreationController

There's no effective difference between these calls and their interactor equivalent, so I linked to them

* For 4596: fix bug that caused rename to not work

* For 4596: removed unused collection actions

These were unused before the LibState refactor

* For 4596: kdoc StepChanged

* For 4596: removed todos about moving logic to the reducer

saveTabsToCollection: this could be moved, but that would involve creating a new action. SaveCollectionStep should probably be refactored out, so adding this layer of indirection seemed counterproductive

handleBackPress: needs to be able to call dismiss(). The reducer doesn't (and shouldn't) be able to do that, so this needs to live here

stepBack: called by handleBackPress. See above

* For 4596: wrote tests for CollectionCreationController#stepback

* For 4596: fixed tests broken by changes to collections

* For 4596: small readability refactor for CollectionController#stepBack

No change to functionality (see tests)

* For 4596: broke apart CollectionView#update

There's probably a lot more that could be done here, but smaller changes were made to reduce scope

* For 4596: remove unnecessary todos

It looks like we don't follow the suggested pattern in this project

* For 4596: test CollectionCreationController#normalSessionSize

* For 4596: updated naming in CollectionCreationController per review
2019-10-22 17:33:54 -07:00
ValentinTimisica 485ccba189 Fixes #5323: Show a snackbar while browsing data is deleting. (#6105) 2019-10-21 09:57:06 -07:00
Sebastian Kaspari 94c5aaac53 Update to Mozilla Android Components 18.0.0-SNAPSHOT. 2019-10-18 17:54:05 +02:00
MozLando 8e4d7248ac Merge #5908
5908: Closes #5876: Removed @ObsoleteCoroutinesApi in tests r=sblatz a=shldhll


### Pull Request checklist
<!-- Before submitting the PR, please address each item -->
- [x] **Quality**: This PR builds and passes detekt/ktlint checks (A pre-push hook is recommended)
- [ ] **Tests**: This PR includes thorough tests or an explanation of why it does not
- [ ] **Screenshots**: This PR includes screenshots or GIFs of the changes made or an explanation of why it does not
- [ ] **Accessibility**: The code in this PR follows [accessibility best practices](https://github.com/mozilla-mobile/shared-docs/blob/master/android/accessibility_guide.md) or does not include any user facing features

### After merge
- [ ] **Milestone**: Make sure issues finished by this pull request are added to the [milestone](https://github.com/mozilla-mobile/fenix/milestones) of the version currently in development.

### To download an APK when reviewing a PR:
1. click on Show All Checks,
2. click Details next to "Taskcluster (pull_request)" after it appears and then finishes with a green checkmark,
3. click on the "Fenix - assemble" task, then click "Run Artifacts".
4. the APK links should be on the left side of the screen, named for each CPU architecture

Co-authored-by: shldhll <iam.shldhll@gmail.com>
2019-10-14 16:52:22 +00:00
MozLando f66b9f3e8f Merge #5633
5633: Add fxa/sync integration tests r=csadilek a=isabelrios

 Pull Request checklist
<!-- Before submitting the PR, please address each item -->
- [x] **Quality**: This PR builds and passes detekt/ktlint checks (A pre-push hook is recommended)
- [x] **Tests**: This PR includes thorough tests or an explanation of why it does not
- [-] **Screenshots**: This PR includes screenshots or GIFs of the changes made or an explanation of why it does not
- [-] **Accessibility**: The code in this PR follows [accessibility best practices](https://github.com/mozilla-mobile/shared-docs/blob/master/android/accessibility_guide.md) or does not include any user facing features

This PR tries to add new tests, sync integration tests, to check the sync process Desktop<->Fenix, first for Bookmarks and in the future for more.

Co-authored-by: Isabel Rios <isabelrios@mackbookirios.home>
Co-authored-by: isabelrios <isabelrios@gmail.com>
2019-10-11 14:43:39 +00:00
shldhll 265f89e772 Added required coroutines in tests. Closes #5876 2019-10-11 00:01:07 +05:30
shldhll 8e17ac05b1 Optimized imports. Closes #5876 2019-10-10 04:17:43 +05:30
shldhll f907ec52f0 Removed ObsoleteCoroutinesApi in tests. Closes #5876 2019-10-10 04:04:51 +05:30
Emily Kager f9afd97a68 For #1901 - Get rid of black flash when leaving GV Engine 2019-10-09 11:02:21 -07:00
Ahmed I. Khalil f008d29bf3 Closes #5852 - Use createAddedTestFragments in tests. 2019-10-09 08:51:52 -07:00
Tiger Oakes 5e2f0dcf26 Remove @ObsoleteCoroutinesApi from TestCore 2019-10-08 15:49:40 -07:00
isabelrios 0e3148f0da fixing more reviewers comments 2019-10-08 09:56:29 +02:00
isabelrios cdefb0d099 Fix TC error and run only ui tests 2019-10-08 09:56:29 +02:00
ekager ef29fe2584 Update BackgroundServicesTest, Suppress Complex Method 2019-09-30 10:33:56 -07:00
Christian Sadilek ac2611d744 Upgrade to A-C 15.0.0-SNAPSHOT (incl. required changes) (#5578)
* Upgrade to Mozilla Android components 15.0.0-SNAPSHOT

* Update findinpage integration to use browser-state

* Use new UseCases APIs after download migration.
2019-09-26 12:50:50 -07:00
Sawyer Blatz 856399e9e2
No issue: Fixes GleanMetricsService nits & broken UI test (#5539)
* No issue: Fixes GleanMetricsService nits

* No issue: fixes broken UI test
2019-09-24 16:12:09 -07:00
Alessio Placitelli 1ffdf1cf9b Add basic test coverage for Glean metrics in Fenix
This introduces test coverage, using the Glean SDK
testing API, for the metrics that are set at startup
by Fenix in the GleanMetricsService.

This additional adds a basic test for the translation
of the `app_opened` event.
2019-09-24 12:33:14 -07:00
Christian Sadilek c866ae1a1e Closes #5444: IntentReceiverActivity: Add tests for intent processing 2019-09-20 19:44:05 -04:00
Tiger Oakes 6c30a94081 Move settings classes to packages 2019-09-20 12:36:15 -07:00
Sawyer Blatz 2db2d9ceae For #1744: Adds tests for clipboard 2019-09-19 08:24:27 -07:00
Sawyer Blatz fd1fcd8b89 For #4155: Adds paste & go for search terms 2019-09-19 08:24:27 -07:00
Grisha Kruglov 8a9340fd9d Post: Clean up 'push' initialization code 2019-09-16 19:44:13 -07:00
Grisha Kruglov d67fb3eed2 Post: Add experiment flags, push and telemetry tests for BackgroundServices 2019-09-16 19:44:13 -07:00