Commit Graph

53 Commits (48ea10cd9d62ae924757a528656265f5805019f1)

Author SHA1 Message Date
ekager 09fbb43f80 For #2486 - Adds Recently Closed Tabs 4 years ago
Kate Glazko ffb794751e No Issue: Fix DownloadItemKtTest 4 years ago
kglazko 5ecab0f48a
For #13935: Enhanced File Type List Icons (#14036)
* For #13935: Enhanced File Type List Icons

* For #13935 - Pulls out and tests logic for getting the icon for a DownloadItem

Co-authored-by: Kate Glazko <kglazko@Kates-MacBook-Pro.local>
Co-authored-by: Jeff Boek <jeff@jeffboek.com>
4 years ago
Kate Glazko 3370762248 For #13983: Show Only Completed Downloads in List 4 years ago
Kate Glazko 7f9e2255f7 For #13979: Deleted Download Files Shouldnt Show 4 years ago
Kainalu Hagiwara d9ffac0c89 For #13405 - Use toolbar location relative to the whole screen instead of window. 4 years ago
Sebastian Kaspari c93a29f89a Simplify build variants to just: debug, nightly, beta and release.
Co-authored-by: Johan Lorenzo <jlorenzo@mozilla.com>
4 years ago
Kainalu Hagiwara 57c7955637 For #12865, #12990 - Disable swipe to switch tabs gesture when the keyboard is visible. 4 years ago
ekager 46511d6f8e For #10163 - Adds tab multiselect mode 4 years ago
Tiger Oakes d3a07e95c9 For #12565: Don't pass contest to SortingStrategy 4 years ago
Tiger Oakes 652af79e95
Migrate from Session.toTab to BrowserStore (#12221) 4 years ago
Tiger Oakes 4dd0c0f224
For #12457: Add MockK matcher for intents (#12612) 4 years ago
Tiger Oakes 69020a1f26
For #12457 - Add MockK matcher for nav directions (#12262) 4 years ago
Tiger Oakes c99a8f5cfa
Fixes #9832 - Change targetSdkVersion to Android 10 (#11014) 4 years ago
Tiger Oakes 41452e945b Move SearchProviderModel extension to class 4 years ago
Tiger Oakes 6bde0378a2
Add tests for StrictModeManager (#12013) 4 years ago
Tiger Oakes ccb532bb77
For #11534 - Don't check lastUsed mode for screenshots (#11827) 4 years ago
Tiger Oakes 18cc4c95c1
Add tests for ContextKt (#11824)
Migrated from an old branch by Kate

Co-authored-by: Kate Glazko <katglazko@gmail.com>
4 years ago
Tiger Oakes f0295048fa Remove Mockito 4 years ago
Tiger Oakes 4b064afb81
Add tests for ext package (#11334) 4 years ago
Christian Sadilek fee09c3092 No issue: Show article/page url instead of reader extension url 4 years ago
Mihai Branescu c4d76dce5a For #6558 - cleanup + added unit tests 4 years ago
mcarare 8cdc523de9 For #9698: Add unit tests for Context extension getStringWithArgSafe 4 years ago
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)
4 years ago
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!).
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
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.
4 years ago
Tiger Oakes 453e7955bb
Add license header to ext tests (#8130) 4 years ago
Suraj Shah 2d64cf8e4c Connectivity manager tests (#7317)
* Fixes #7316
Adds tests for ConnectivityManager.isOnline

* Fixes detekt errors.

* Cleaning tests

* Cleaning tests to use boolean checks instead of object equals
4 years ago
Severin Rudie b23ee38082 For #7556: fix intermittent failure in BookmarkNodeTest 4 years ago
Michael Comella cf143489e1 For #6464: Replace use of BuildConfig.DEBUG with ReleaseChannel.channel.isDebug.
This fixes performance issues where StrictMode would greatly slow down
startup in the forPerformanceTest variants.
4 years ago
Tiger Oakes ea486d7c66
Split out CustomTabToolbarIntegration (#7107) 4 years ago
Severin Rudie 7477de83e9 For #4844: fix file prefix url shortening 5 years ago
cesar 63cf034bfb test fixed 5 years ago
Daphne Liu 4cfbaf2dc4 Switched to AC string extensions (#6258)
* Switched to AC string extensions

* Clean up imports
5 years ago
Severin Rudie 8d68317388
4844 fix url elision (#6588)
* For #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
Shangeeth Sivan 218763f9be For #4556: Removed redundant code in few tests. (#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 #4556

* Added @Before method to FragmentTest class Fixes #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
Jeffrey Starke 6a6c4f75dd * Move repeated NavControllerTest logic to @Before set up method
* Use property access syntax where applicable in NavControllerTest
5 years ago
Kate Glazko 6210bb1da2 ExtTest for BookmarkNode 5 years ago
MozLando 662be3f686 Merge #5974
5974: Ext Test For ImageButton r=mcomella a=kglazko



Co-authored-by: Kate Glazko <katglazko@gmail.com>
5 years ago
Kate Glazko 829da2e546 Ext Test For ImageButton 5 years ago
shldhll 8e17ac05b1 Optimized imports. Closes #5876 5 years ago
shldhll f907ec52f0 Removed ObsoleteCoroutinesApi in tests. Closes #5876 5 years ago
Colin Lee b7647a454f
For #5599: Remove dependency on fetch_httpurlconnection (#5716)
* For #5599: Remove dependency on fetch_httpurlconnection

* For #5599: Switch Glean to GeckoViewFetchClient

* Use existing Gecko client for Glean
5 years ago
Tiger Oakes 05a4faec78 Add tryGetHostFromUrl and update ExceptionDomains 5 years ago
Colin Lee df8aed9158
For #5274: Fix LogTest unit tests (#5275) 5 years ago
Emily Kager 768c7c2d35 Closes #5268 - Fix 2 detekt errors 5 years ago
kglazko 3fd44e8d83
Issue 4622- Create Unit Tests for Extensions (#4669) 5 years ago
Tiger Oakes d1964d6536 Fixes #4771 - Add method for sessions of type (#4782)
Fixes share tabs to use the new method
5 years ago
Sawyer Blatz da06b0fb15
For #4508: Treats warnings as errors (#4543) 5 years ago