Commit Graph

28 Commits (9654b4dfb122b54b04369fe80a2f9c95811478e8)

Author SHA1 Message Date
Gabriel Luong 9654b4dfb1 For #27667 - Remove import-ordering from the list of disabled ktlint rules 2 years ago
Jan-Erik Rediger bbf2d427d2 Adjust all telemetry tests to follow new Glean APIs
These are mostly mechanical changes to replace usage of `testHasValue`
with `testGetValue`.
`testGetValue` will now return `null` instead of throwing an exception
if no data is available.
2 years ago
Mugurell fc2c1700c9 For #23876 - Update kotlinx-coroutines to 1.6.1. Refactor runBlocking in tests.
After the update `TestCoroutineDispatcher`, `TestCoroutineScope` and
`runBlockingTest` are deprecated.
Instead of these new `TestDispatcher`, `TestScope` and `runTest` APIs are used.

Took the oportunity to also replace most of the `runBlocking` calls with the
new `runTest` specially designed for running coroutines in tests API.
2 years ago
Mugurell e006538c63 For #24618 - Add WebNotificationIntentProcessor to IntentReceiverActivity
The processor from Android-Components will know how to handle the intent
specific to web notifications clicks.
2 years ago
mcarare ac1eeec57a For #24210: Remove wrapper from opened link event. 2 years ago
Sebastian Kaspari 834d0ee12d Issue #22489: Remove "Fennec to Fenix" migration code 2 years ago
Sarah Khan 26c7562e62 For #23596 and #23309 - Add deeplink to wallpaper settings 2 years ago
Grisha Kruglov 8de4c0b4db For #22569: Remove allopen plugin and Mockable annotations 2 years ago
Sebastian Kaspari 170fa9705e Update Kotlin and Jetpack Compose versions. 3 years ago
Michael Comella 7c0d00c800 No issue: fix tests related to inline change.
The difficulty in mocking StrictMode.resetAfter is concerning.
I'm starting to second-guess whether or not making strict mode manager a class
was a good idea.
4 years ago
Michael Comella f19c9920f9 For #13959: move resetAfter into StrictModeManager.
In a followup PR, we need to add state to strictModeManager (the
number of suppressions). This is much simpler to do when this is defined
as a class rather than an object. However, when this is defined as a
class, `resetAfter` needs access to the strictModeManager. Instead of
passing it in as an argument, it made sense to move this function onto
the strictModeManager instead.

Since folks are used to calling:
```
StrictMode.ThreadPolicy.allowThreadDiskReads().resetAfter
```

We're going to have to add a lint check to prevent them from doing that.
4 years ago
Tiger Oakes d45af2a717
For #11903: Fix private custom tabs (#13327) 4 years ago
Tiger Oakes eed20b43b9
Test session control controller (#12652) 4 years ago
Tiger Oakes f0295048fa Remove Mockito 4 years ago
Jonathan Almeida 9f95cff6c4 Close #7749: Fix broken IntentReceiverActivity tests 4 years ago
Jonathan Almeida e995a98819 Revert "Disable failing intent handling unit tests"
This reverts commit c956f8b2afc988444771d86072adc94598c602c3.
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
Sebastian 7b170c4428 Update IntentProcessor implementation to comply with new interface. 4 years ago
Jonathan Almeida 7f988a85d0 Disable failing intent handling unit tests 4 years ago
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
5 years ago
Pawel Obarzanek 667602f02a Closes mozilla-mobile#5458 Tests for IntentReceiverActivity to verify outcoming intent (#6130) 5 years ago
shldhll 8e17ac05b1 Optimized imports. Closes #5876 5 years ago
shldhll f907ec52f0 Removed ObsoleteCoroutinesApi in tests. Closes #5876 5 years ago
Sawyer Blatz 371e2ac3d8
For #514 & #5742: Updates "launch links in private tab" functionality (#5721)
* For #514 & #5742: Updates "launch links in private tab" functionality

* Fixes comments
5 years ago
Sawyer Blatz 2896b36d14
No issue: Updates naming of launch links privately var (#5701)
The previous name was pretty confusing
5 years ago
Tiger Oakes 88aa519210 Closes #4711 - Extract VoiceSearchActivity (#5502) 5 years ago
Tiger Oakes 8c30200ced Only use Context.settings() function (not getter) (#5335)
Remove unused String extensions
5 years ago
Christian Sadilek c866ae1a1e Closes #5444: IntentReceiverActivity: Add tests for intent processing 5 years ago