Skip to content

Draft: Get settings fragment test working

Merge Info

Related Issues

  • tor-browser#xxxxx
  • tor-browser-build#xxxxx



  • Immediate: patchset needed as soon as possible
  • Next Minor Stable Release: patchset that needs to be verified in nightly before backport
  • Eventually: patchset that needs to be verified in alpha before backport
  • No Backport (preferred): patchset for the next major stable

(Optional) Justification

  • Emergency security update: patchset fixes CVEs, 0-days, etc
  • Censorship event: patchset enables censorship circumvention
  • Critical bug-fix: patchset fixes a bug in core-functionality
  • Consistency: patchset which would make development easier if it were in both the alpha and release branches; developer tools, build system changes, etc
  • Sponsor required: patchset required for sponsor
  • Other: please explain

Issue Tracking


Request Reviewer

  • Request review from an applications developer depending on modified system:
    • NOTE: if the MR modifies multiple areas, please /cc all the relevant reviewers (since gitlab only allows 1 reviewer)
    • accessibility : henry
    • android : clairehurst, dan
    • build system : boklm
    • extensions : ma1
    • firefox internals (XUL/JS/XPCOM) : ma1
    • fonts : pierov
    • frontend (implementation) : henry
    • frontend (review) : donuts, richard
    • localization : henry, pierov
    • macos : clairehurst, dan
    • nightly builds : boklm
    • rebases/release-prep : dan, ma1, pierov, richard
    • security : ma1
    • signing : boklm, richard
    • updater : pierov
    • misc/other : pierov, richard

Change Description

In implementing !106 (merged), I mostly copied from HTTPS-only mode. In doing so I also added some tests for it (very easy to write to cover all 3 cases while following HTTPS-only mode as the example) and went down a short little rabbit hole to get SettingsFragmentTest.kt working too (when ran in isolation). I basically just commented out all the undefined/breaking test code (due to its supporting code being removed in other MR's but without updating the tests) and added a torController mock. I know we haven't been prioritizing testing but maybe this could be a start down that road? I think a good first easyish step is to get moz's tests working, and later we can add our own (I've only added tests a couple times, including this time, in all the work I've done here, so it will be a big task)

How Tested

Edited by clairehurst

Merge request reports