Commit Graph

3224 Commits

Author SHA1 Message Date
ekager
59484208d6 No issue: Update Private Browsing placeholder string 2020-04-24 11:39:14 -07:00
Mihai Branescu
8a80fbe14c For #6558 - change from modifying event to event listener
The initial design replaced the onload method, which was used by others such as Bing.
With listeners it's additive, we do not replace anything.
2020-04-24 09:28:40 -07:00
Mihai Branescu
8e66e19dbb For #6558 - remove baidu and yahoo from monitored pages
These two do not contain ad servers, so we don't need to unnecessarily monitor them
2020-04-24 09:28:40 -07:00
Mihai Branescu
c4d76dce5a For #6558 - cleanup + added unit tests 2020-04-24 09:28:40 -07:00
Mihai Branescu
f03d65b13d For #6558 - added logic for ad_clicked metric 2020-04-24 09:28:40 -07:00
Mihai Branescu
93ca1f6d9f For #6558 - added handling of web extension + sending metric for has_ads 2020-04-24 09:28:40 -07:00
Mihai Branescu
c4f7972f2b For #6558 - added web extension for extracting document urls 2020-04-24 09:28:40 -07:00
Simon Chae
f1559ed2da
For #10162: Set switch back to prev state when failed to enable/disable addon (#10164) 2020-04-24 11:54:16 -04:00
Oana Horvath
e4764592fd
fix private notification text (#10192) 2020-04-24 17:55:46 +03:00
mcarare
2edd4b39a4 For #9913, For #9914: Remove button when disabling it.
Setting visibility to GONE allows clicks to parent view in that space.
2020-04-24 16:42:47 +03:00
Arturo Mejia
956bf01cd5 For issue #9493: Reload after cleaning individual site permissions exceptions 2020-04-24 06:16:32 -04:00
David Walsh
6f5f48c30e
For #10148 - Add basic tab tray implementation without exposing to rest of app (#9934) 2020-04-23 15:38:35 -05:00
Vlad Filippov
e51e1c878b Add 'useEmail' and 'useEmailProblem' metrics event
Fixes #9834
2020-04-23 10:33:36 -07:00
Simon Chae
b3248ec769 For #6123: Expose WebExtensions in private browsing control 2020-04-23 12:28:57 -04:00
mcarare
cc67de29bf For #10091 Also disable play/pause button when hiding it. 2020-04-23 09:22:01 -07:00
mcarare
9dd8314d14 For #10091 Add extension to remove and disable button 2020-04-23 09:22:01 -07:00
mcarare
932fd44823 For #7387: Change ETP onboarding from popup to a dialog.
Recalculated dialog position and offsets.
Changed ETP onboarding dialog to show only once.
2020-04-23 08:17:42 -07:00
mcarare
72fe52fcb8 For #9987: Set FLAG_SECURE to dialog when flag set in activity. 2020-04-23 08:16:25 -07:00
ValentinTimisica
da3fca0f29 Fixes #10109: Adds content description for browse privately card content 2020-04-23 16:59:42 +03:00
JLRoberts
26e8d9bcca For #9550 - Don't overlap search with shortcuts text
Private mode search with suggestion onboarding was overlapping "This time, search with: " text. Adjust constraints to allow it to show under onboarding when present.
2020-04-23 11:21:53 +03:00
mcarare
e11f1b62dc For #10027: Make toolbar context menu popup dismissible on SDK<23 2020-04-22 22:47:46 -07:00
ekager
c4e83367f6 For #6832 - Fix various fragment not attached to a context crashes 2020-04-22 20:56:35 -07:00
ekager
6457a02a82 For #2818 - Enable PiP for all builds 2020-04-22 20:55:00 -07:00
Sawyer Blatz
95f26f1fdc
For #9946: Update FennecBeta branding (#10066) 2020-04-22 15:19:24 -07:00
Roger Yang
0227e953ae Close #9760: Add external app links context menu candidate 2020-04-22 14:45:49 -07:00
Sawyer Blatz
dce16964c0
For #9208: Adds in-product prompt to homescreen (#9836) 2020-04-22 14:29:43 -07:00
Arturo Mejia
0a23d66756 For issue #7566 Handle deny & don't ask again for site permissions 2020-04-22 11:33:32 -04:00
Arturo Mejia
995da59fa8 For issue #9493: Reload after cleaning all site permissions exceptions 2020-04-22 08:53:07 -04:00
ekager
70755adf6e For #10036 - Workaround for System Theme changes with config change 2020-04-22 00:01:54 -07:00
Michael
1f8b7ff962 Closes #8541: Hide find bar when entering fullscreen 2020-04-22 00:01:35 -07:00
Jeff Boek
164e6cd079 For #9816 - Adds SessionObserver to session on selection 2020-04-21 14:08:58 -07:00
Jonathan Almeida
6ad046714d Close #9338: Enable WebPush engine integration in all builds 2020-04-21 09:38:13 -04:00
ekager
f3847d0d7c For #8735 - Adjust fontInflation engine setting when toggling useAutoSize 2020-04-21 09:05:25 +03:00
Mozilla L10n Automation Bot
c702de05f9 Import l10n. 2020-04-21 09:04:12 +03:00
ekager
a1554834f9 Adds destructive colors for private theme 2020-04-20 23:00:41 -07:00
codrut.topliceanu
d80005235f For #8546 - Overrides for new TextInputLayout colors 2020-04-20 23:00:41 -07:00
ekager
66d9a24b28 Closes #9928 - Updates private browsing text description 2020-04-21 09:00:06 +03:00
ekager
5d51c4f059 Don't use ProcessLifecycleOwner for view-tied consume 2020-04-20 12:07:37 -07:00
ekager
f801f32027 No issue: Fix leaks in BookmarkFragment 2020-04-20 12:07:37 -07:00
ekager
5014cd78ec No issue: Fix leaking sessionControlInteractor 2020-04-20 12:07:37 -07:00
isabelrios
587bdfbd7b
For #8081 - UI screenshots tests update (#10023) 2020-04-20 10:39:56 -04:00
Ryan Kelly
8ebb891bf8 Some cleanups for running the sync integration tests 2020-04-18 02:30:44 -07:00
Grisha Kruglov
853a0acab4 Closes #4046: Always display 'Desktop' bookmarks folder
See https://github.com/mozilla-mobile/fenix/issues/4046 for a detailed discussion of this.

In short, this patch removes code that would conditionally hide desktop bookmarks depending
on the signed-in state of the browser.
2020-04-17 23:57:43 -07:00
Jonathan Almeida
c16283a923 For #9932: Fix navigation icon theme missing from migration UI
Setting the `navigationBarColor` is done in the ThemeManager for the
attached activity. Since the migration UI is separate from that, we did
not get this for free.
2020-04-17 22:45:30 -07:00
Sawyer Blatz
89cfa3ea9a For #9808: Fix scrolling cutoff on homescreen 2020-04-17 19:58:22 -07:00
Sawyer Blatz
a8e624959e
For #6940: Fixes top dynamic toolbar behavior (#9900) 2020-04-17 13:32:20 -07:00
Roger Yang
40550e88de
Close #9960: Launch URI in Fenix if failed to launch in custom tab (#9964) 2020-04-17 16:24:20 -04:00
Christian Sadilek
ec1d4e8fca For #8399: Hide keyboard to prevent content resizes
This hides the keyboard after committing a URL in the
Toolbar right before we navigate from the SearchFragment
to the BrowserFragment. If the BrowserFragment is being
displayed before the keyboard is gone an expensive
resize of the engine view (content) is triggered when the
keyboard finally goes away. This is to prevent that.
2020-04-17 12:07:44 -07:00
Emily Kager
d3093e4afe
For #8428 - move about text from static_strings.xml to strings.xml and fix comment (#10009)
Co-authored-by: Sören Hentzschel <kontakt@agenedia.com>
2020-04-17 11:50:56 -07:00
Jonathan Almeida
cab0bfc073 For #8422: Add more misc migration UI fixes 2020-04-17 14:22:25 -04:00
Michael Comella
909ee734bf For #8803 - post: update metrics & pings data review URL. 2020-04-17 09:11:58 -07:00
Michael Comella
f3ed207bdb For #8803 - review: Add clarifying comments to onAppInit capture methods. 2020-04-17 09:11:58 -07:00
Michael Comella
2888d66ce0 For #8803 - review: move forward metric expiration date.
We primarily want to determine if this is a problem area for us to
investigate rather than a long term measurement to keep so we should set
the expiration date accordingly. Furthermore, this code executes before
crash reporting is init so it's ideal to remove it sooner rather than
later.
2020-04-17 09:11:58 -07:00
Michael Comella
f49fc6dad2 For #8803: hook up frameworkStart metric. 2020-04-17 09:11:58 -07:00
Michael Comella
dbf733d70a For #8803: add StartupFrameworkStartMeasurement.
This class controls the central logic around the metrics we want to
record.
2020-04-17 09:11:58 -07:00
Michael Comella
7f618a6a7c For #8803: add Stat and test.
We need to access the data in stat to get the process start time, so we
can calculate the time from process start until application.init for the
frameworkStart probe.
2020-04-17 09:11:58 -07:00
Michael Comella
a0c4b33b0f For #8803: add StartupTimeline ping type and framework_start metrics. 2020-04-17 09:11:58 -07:00
Emily Kager
39107b4036
For #9703 - Exit fullscreen in onPause and onSessionSelected (#10016)
* For #9703 - Call fullScreenChanged in onPause

* For #10015 - Exit full screen if new session selected
2020-04-17 08:57:36 -07:00
ekager
6f77ec5951 Use HomeFragment viewLifecycleOwner for BrowserSessionsObserver 2020-04-16 21:00:27 -07:00
Grisha Kruglov
0ec6d266e8 Use HomeFragment's viewLifecycleOwner as the lifecycle for accountManager observer registry
If we just use the HomeFragment itself, we end up with a memory leak since the lifecycle events
that would clean up the registry (e.g. destroy) won't run (if the fragment is retained in the backstack, for example).
2020-04-16 21:00:27 -07:00
Mihai Adrian
72fe9fad0c
For #9987: Set FLAG_SECURE to dialog when flag set in activity. (#9998)
* For #9987: Add extension to secures dialog if parent activity is secured

* For #9987: Set FLAG_SECURE to dialog when flag set in activity
2020-04-16 20:33:57 -07:00
mozilla-l10n-automation-bot
dbbd048b6c
Import l10n. (#10011) 2020-04-16 20:32:21 -07:00
Emily Kager
1df9c53b9f
Fix: Set correct height for EditText (#10014)
Created a dimension for the correct height that the EditText in the
fragment_edit_bookmark.xml has to have.

Co-authored-by: DrCesar <josuejacobstercero@gmail.com>
2020-04-16 20:31:25 -07:00
Mihai Eduard Badea
725ba1e856 For #9951 - Removed the extra empty spaces that were causing the spacing issue 2020-04-16 20:12:18 -07:00
mcarare
5a2a779ef5 For #9565: Adjust padding and height to allow longer text 2020-04-16 20:10:45 -07:00
mcarare
e87ea301ab For #9536: Update tests to check opened tab is in same browsing mode 2020-04-16 19:50:25 -07:00
mcarare
83d2208c6b For #9536: Open report issue tab depending on current browsing mode.
Checking if session is private uses the new browser state API.
2020-04-16 19:50:25 -07:00
mcarare
8440f1867a For #9989: Add start & end margin to button. 2020-04-16 19:43:34 -07:00
Sawyer Blatz
1f8f69548a For #7158: Fixes browser to search animation fade 2020-04-16 14:03:26 -07:00
ekager
6df11619fd No issue: Uses NeutralButton for Migration Activity 2020-04-16 13:14:34 -07:00
Jonathan Almeida
2bb1b6edad For #8422: Add misc migration UI fixes 2020-04-16 12:02:02 -07:00
Jonathan Almeida
25d5b0d31c For #8422: Add spacing between migration items 2020-04-16 12:02:02 -07:00
ekager
4a06a228f3 For #9981 - Make Bookmark Menu UI respond to session selection 2020-04-16 10:49:16 -07:00
mcarare
25e12e2f77 For #9984: Update addon before settings visibility check 2020-04-16 10:25:37 -04:00
Mozilla L10n Automation Bot
3e8836f71a Import l10n. 2020-04-16 10:13:30 +03:00
ekager
688a33522b For #9516 - Adds selectable background to dialog and snackbar buttons 2020-04-16 10:13:08 +03:00
Sawyer Blatz
8185ba793e
For #9857: Create button style (#9858)
* For #9857: Creates text button style

* Adds lint check

* Fixes onboarding cards
2020-04-15 15:49:02 -07:00
Jonathan Almeida
997f6c72d6 For #9409: Add app icon to Leanplum push notifications 2020-04-15 17:55:12 -04:00
Jonathan Almeida
e97904662c Remove duplicate FirebasePushService
When we moved push to it's own component the class was supposed to have
been moved but git might have only picked it up as an addition.
2020-04-15 17:55:12 -04:00
Mihai Branescu
bded28a017
For #9420 - relaxed custom engine rules (#9967)
Allow websites that return 404 to be added
Change long query param with one with higher changes of being found
2020-04-15 13:20:06 -07:00
Michael Comella
f0464b9e72
For #9644: restrict deps to specific repositories (#9649)
* For #9644: remove unnecessary leanplum maven repository.

The docs say it is [1] "only needed for Android SDK versions below 4.3.0".
That is API 18 and our min SDK is 21.

[1]: https://docs.leanplum.com/reference#android-setup

* For #9644: move buildscript block from :app to root project.

This will reduce the amount of duplication we need in specifying
restricted dependencies and centralize repository definitions. Since
we're a one project app, it shouldn't have a significant impact on
performance.

* For #9644: restrict dependencies following FFTV config.

However, there is a resolution error to be fixed in the next commit.

This is verbatim from FFTV except I removed the no-op "improve security
if code is refactored incorrectly" lines: these lines rarely changed and
I'm not that concerned. It might be better to simplify the
configuration.

Source:
  62a2fa680c/buildSrc/src/main/java/org/mozilla/gradle/Dependencies.kt (L7)
  62a2fa680c/build.gradle (L31)

* For #9644: restrict firebase deps to google repo.

This fixes the resolution error from the previous PR.
2020-04-15 10:54:36 -07:00
ValentinTimisica
c7b123cfea
Fixes #9710: Vertically aligns users_count with rating (#9950) 2020-04-15 10:51:55 -07:00
ekager
aef827e607 For #9887 - Respect screenshot setting when resetting window flags in logins 2020-04-15 09:03:26 -07:00
Jeff Boek
06f1b6c992
No Issue - Fixes nav_graph issues (#9926) 2020-04-15 08:34:45 -07:00
Arturo Mejia
37a277febb For issue #9930 Do not assume all add-ons have a settings page 2020-04-15 06:20:34 -04:00
Mozilla L10n Automation Bot
9a298ea6ba Import l10n. 2020-04-15 03:50:48 +03:00
ekager
2056b6f2ff Update UI test to match Support Page title 2020-04-14 11:34:55 -07:00
ekager
55b04b9885 Update Server.dev to Server.stage to fix A-S upgrade breaking change 2020-04-14 11:34:55 -07:00
Arturo Mejia
8872baef39 Update Android Components version 2020-04-14 11:34:55 -07:00
Arturo Mejia
7c279b6e1f No issue: Fix add-on translate() breaking change 2020-04-14 11:34:55 -07:00
ekager
5b1cdbd8bf For #3194 - Pause media while undo snackbar appears 2020-04-14 09:55:39 +03:00
ekager
9c56a8b387 For #204 - Remove PWA Feature Flag 2020-04-14 09:55:14 +03:00
Mozilla L10n Automation Bot
69c7196e77 Import l10n. 2020-04-14 09:54:30 +03:00
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
2020-04-13 21:43:45 -07:00
Arturo Mejia
eace991859 For issue #8520: Improve add-ons UI 2020-04-13 19:01:58 -04:00
ekager
b8fba63be4 For #9890 - Do not display full screen snackbar with toolbar padding 2020-04-13 14:56:51 -07:00
ekager
ac3a557ddf For #9703 - Exit full screen on pause if pip not entered 2020-04-13 14:31:57 -07:00
Sawyer Blatz
7c3394ea7c
For #9892: Set dynamicToolbarMaxHeigtht to 0 for PWAs (#9893) 2020-04-13 13:08:08 -07:00
ekager
8c238402e2 For #9692 - Fix "Install" PWA menu item labeling 2020-04-13 10:09:37 -07:00
ekager
5039546dc5 For #7208 For #7212 - Update parameterized strings 2020-04-13 09:40:47 -07:00
Christian Sadilek
152642d98d Configure M2 AMO collection for Nightly/Debug 2020-04-13 10:42:39 -04:00
Oana Horvath
52857b09d7
fix #9670 intermittent tests (#9767)
also disabled intermittent closePrivateTabsNotification
2020-04-13 13:17:35 +03:00
mcarare
8cdc523de9 For #9698: Add unit tests for Context extension getStringWithArgSafe 2020-04-13 09:40:00 +03:00
mcarare
a214f04b4a For #9698: Use extension to ensure fallback to English and avoid crash 2020-04-13 09:40:00 +03:00
mcarare
4a1a875233 For #9698: Add Context extension to avoid format IllegalArgumentException 2020-04-13 09:40:00 +03:00
Mozilla L10n Automation Bot
e1bc8dc190 Import l10n. 2020-04-13 09:38:41 +03:00
Mugurell
b72c223244
For #7157 - Set BrowserMenu width to be max 314 dp (#9731)
Instead of having a fixed width of 250dp the BrowserMenu will now have a
dynamic width between 250dp and 314dp allowing for a better fit for the menu
items it could display.
2020-04-10 10:17:07 -07:00
mcarare
1881975a31 For #9793: Adjust relative positions to provide correct a11y traversal 2020-04-10 14:35:58 +03:00
Mozilla L10n Automation Bot
c31c198d54 Import l10n. 2020-04-09 17:38:37 -07:00
mcarare
177baf58a8 For #9798: Disable buttons on hiding and enable on showing.
This is triggered on collection expanding or shrinking that is animated.
The animation has android:fillEnabled="true" android:fillAfter="true".
This interferes with set visibility to gone and the click still triggers.
Disabling button avoids changing animation or force clearing it.
2020-04-09 16:06:11 -07:00
Simon Chae
de311aef85
Update not yet unavailable add-on string (#9677) 2020-04-09 15:25:08 -04:00
Roger Yang
c9141c9ae5 Close #9827: Support display cutouts 2020-04-09 10:13:37 -07:00
Christian Sadilek
7f1ef17d8b No issue: Re-use existing usecases for addons 2020-04-09 12:53:47 -04:00
ekager
56eb2ec1d7 For #2818 - Adds Picture-in-Picture feature 2020-04-09 08:56:48 -07:00
Mozilla L10n Automation Bot
ed466d34f7 Import l10n. 2020-04-09 08:20:41 +03:00
Michael Comella
4437ddd536 No issue: Move Do and OpenClass to utils pkg.
They were both in their packages by themselves, which feels unnecessary.
Unfortunately, a utils pkg is discouraged by kotlin but we don't have a
better place for them right now. Maybe an annotations/ pkg for the
latter?
2020-04-08 12:39:22 -07:00
mcarare
413af92bc5 For #9797: Set min height of dialog edit text to 48dp. 2020-04-08 10:12:20 -04:00
Abhay Agarwal
1c65bb8255 Closes #9495: Dismiss the ShareFragment in onPause() 2020-04-08 13:10:37 +03:00
Sawyer Blatz
12d486bf02
Issue #9682: Reduces size of branding (#9784) 2020-04-07 14:05:07 -07:00
Christian Sadilek
0f1bff7402 No issue: Refactor readerview to use browser-state 2020-04-07 16:31:03 -04:00
Sawyer Blatz
e94af334fc
No issue: Add more settings animations (#9750) 2020-04-07 10:44:23 -07:00
Mihai Eduard Badea
d66da53c9a For #2768 - Prevent screenshots in private mode
Added a new option in Private browsing menu to allow or prevent screenshots from being taken while in private mode by adding or removing the FLAG_SECURE flag from the home activity's window.

 This method is called whenever the activity is initialized to account for the browsing mode being changed and whenever the setting from the Private browsing menu is changed.

 The setting is by default set to true (screenshots are allowed to be taken)
2020-04-07 17:23:06 +03:00
Mugurell
29539c458e For #9770 - Disable pull to refresh pending changes 2020-04-07 17:06:43 +03:00
Mozilla L10n Automation Bot
a12cb5b0c3 Import l10n. 2020-04-07 10:30:26 +03:00
Michael Comella
9305331a56 For #9631: remove assertk dependency. 2020-04-06 16:56:40 -07:00
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!).
2020-04-06 16:56:40 -07:00
Jeff Boek
c632b93ee7
For #220 - Removes feature flag for language picker (#9191)
* For #220 - Removes feature flag for language picker

* For #220 - Updates Android Components
2020-04-06 14:29:52 -07:00
Mihai Adrian
dfded8e69c
For #9687: Refactor onboarding cards to follow app architecture (#9743)
* For #9687: Refactor onboarding cards to follow app architecture

* For #9687: Update unit test to new controller parameters
2020-04-06 11:00:47 -07:00
Arturo Mejia
025656d8fd For issue #9647 Crash when tapping settings after quickly
enabling/disabling add-on
2020-04-06 13:47:21 -04:00
Michael Droettboom
3789f50423 Fix errors in top_sites_count metric
We discovered in the Fenix metrics errors query [1] that
top_sites_count had a spike in the number of errors. It
seems to be recording a count of 0, which is an invalid value.

[1] https://sql.telemetry.mozilla.org/queries/67107/source#169983
2020-04-06 10:34:52 -07:00
Mozilla L10n Automation Bot
2d55b07935 Import l10n. 2020-04-06 12:20:41 +03:00
mcarare
cac8115e55 For #9663: Allow more than one line for onboarding card header 2020-04-03 17:47:11 -07:00
Mozilla L10n Automation Bot
9e470c93ca Import l10n. 2020-04-03 17:38:26 -07:00
Aaron Train
b35704beed Closes #9688: Disable ReaderViewTest for intermittent investigation in detection issues 2020-04-03 22:04:43 +03:00
Oana Horvath
b2da0bd922
For #9670: Disabled intermittent tabMediaControlButton test (#9679)
and removed file created by mistake -e

added reason for disabled tests
2020-04-03 20:39:33 +03:00
Mugurell
904bfc9ebe For #3262 - Enable pull down to refresh in Nightly 2020-04-03 19:40:08 +03:00
Michael Comella
51a76651d6 For #9605 - review: clarify comments in new test runner. 2020-04-03 09:27:49 -07:00
Michael Comella
b60a21c08d For #9605: Add LintUnitTestRunner gradle task.
This will prevent us from regressing on adding older versions of the
unit test runner.
2020-04-03 09:27:49 -07:00
Michael Comella
efef8eaba0 For #9605: TestApplication -> FenixRobolectricTestApplication.
This disambiguates it from the FirefoxTestApplication used in on-device
tests.
2020-04-03 09:27:49 -07:00
Michael Comella
8df49473c0 For #9605: move TestApplication to the helpers package.
The helpers/ package is created to separate the test support code from
the code under test.
2020-04-03 09:27:49 -07:00
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
2020-04-03 09:27:49 -07:00
Michael Comella
b0cfa3ee5c For #9605: add FenixRobolectricTestRunner.
This class will help us reduce duplication by specifying the
configuration within the test runner rather than each test needing to
specify it itself.

This class is adapted from Firefox for Fire TV:
  https://github.com/mozilla-mobile/firefox-tv/blob/master/app/src/test/java/org/mozilla/tv/firefox/helpers/FirefoxRobolectricTestRunner.kt
2020-04-03 09:27:49 -07:00
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.
2020-04-03 09:27:49 -07:00
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.
2020-04-03 09:27:49 -07:00
Aaron Train
cb009f915c
No issue: re-enable libraryMenuItemsTest and backButtonTest (#9639) 2020-04-03 10:37:03 -04:00
MickeyMoz
f46cfc2ad2 Update Android Components version to 38.0.20200403130109. 2020-04-03 16:15:31 +02:00
Mozilla L10n Automation Bot
8413b8133d Import l10n. 2020-04-03 16:19:33 +03:00
Michael Comella
4a8dc5b54f No issue: add kdoc to HomeActivity.
We could consider renaming the Activity to make it clearer that it's the
main activity and doesn't just feature the homescreen but I'm concerned
that renaming it will break too many things (e.g. automation that starts
a specific activity). For quick fix, I added this comment.
2020-04-02 16:27:00 -07:00
Sawyer Blatz
e3ed7ed268
Issue #9128 & #9222 & #9499: Refactors snackbar creation and fixes placement (#9628) 2020-04-02 12:30:13 -07:00
Codrut Topliceanu
8c43935ba3
For #7978 - Put views above button in scrollView (#8819) 2020-04-02 10:13:32 -07:00