With current rebased tor-browser ESR68 branch I can only run tbb-tests (with run-tbb-tests script) when pref("network.file.path_blacklist", "/net") is removed and pref("extensions.torbutton.use_nontor_proxy", true); is set, apart from disabling tor-launcher. The second pref disables the domain isolator, which makes sense since it expects SOCKS5 proxies, but mochitests override that. For the other pref, not sure why network.file.path_blacklist needs to be unset (at least for Linux).
We could put these prefs in testing/marionette/prefs/marionette.js so that tests can be run (unless there is a simpler way to get the tests tor run that I'm missing).
Designs
Child items ...
Show closed items
Linked items 0
Link issues together to show that they're related.
Learn more.
c73bfe7f3b21421c7349267f2abac9f90f503b73: we need layout.css.line-height.normal-as-resolved-value.enabled = false, otherwise line-height property is read as normal and we cannot get the number in pixels
You should update that to fall back to clientRect (which I do on TZP): you'll need to anyway once you are based on ESR78 (or rapid release)
c73bfe7f3b21421c7349267f2abac9f90f503b73: we need layout.css.line-height.normal-as-resolved-value.enabled = false, otherwise line-height property is read as normal and we cannot get the number in pixels
You should update that to fall back to clientRect (which I do on TZP): you'll need to anyway once you are based on ESR78 (or rapid release)
Thanks for the suggestion. I spent some time playing with getBoundingClientRect() to find out the line-height, but I saw some inconsistent behaviour. One of the testscases in test_tor_bug23104.html has arabic characters, which sets its font to Noto Naskh Arabic. That one, despite reporting a line-height of 20.4px, when measured via getBoundingClientRect() it turns out to be 29px (using a div to measure, instead of a span, the height of which is not affected by line-height). I assume that there must be some metric of the arabic font which is affecting the actual height of the element, which is different than the reported in line-height.
I'm not sure if the issue that legacy/trac#23104 (moved) tried to fix is still there, and can be measured via getBoundingClientRect or similar. In any case, the fact that the actual height does not match the line-height with some fonts (e.g. Noto Naskh Arabic) seems to be a different issue. So perhaps we can just leave the test as it is for now (using layout.css.line-height.normal-as-resolved-value.enabled = false) and investigate it later.
Still, I was thinking that the issues in legacy/trac#23104 (moved) and legacy/trac#29563 (moved) only allow distinguishing platform, but not subplatform, right? If that's the case, perhaps we could consider just dropping the patch for legacy/trac#23104 (moved), as leaking the os (via fonts?) is not something that we can really avoid.
From my notes
// Read the span width, but the div height. Firefox always reports the same value for the span's offsetHeight, even if the div around it is changing size
I don't see a problem with "leaking" the major OS (Win, Mac, Android, Linux: we'll never stop that), its the entropy across Linux (and Android for now, see below) that worries me. And we should always make it as hard as possible for the bastards. The patch is still protecting most/all users from alternative measuring - e.g. domrect.
FWIW: I also see occasional weird measurements, e.g. with textMetrics, with various codepoints and/or fonts: still trying to pinpoint exactly what it is: but I think it might mainly be to do with right-to-left.
I'm not sure I see the issue with Noto Naskh Arabic: if all users are the same, then it's OK. Sure, it's not 19.2, but it might just be an odd outlier (for everyone?). If someone is spoofing as English - their default font is Times New Roman. And if they're not, then they are already different: navigator languages etc - e.g. TB-fa. The question is, is everyone the same?
legacy/trac#23104 (moved) also lacks parity effectiveness in Android (and least on my phone): it's doing something (toggle RFP) but it sure isn't 19.2 either. I sent sysrqb an email about it months ago (last December) - it's something to with the 19.2 is only returned at certain zoom levels: and on my Android phone, the devicePixelRatio is 2.609... and it screws up - so it's really a case of this being a symptom of legacy/trac#29563 (moved)
At the end of the day, even once ESR78 is used (or you flip the pref early: there's nothing to say you can't do that now), I would still keep the patch: because domrect can still measure it
Keep the test, close this, and re-purpose legacy/trac#29563 (moved) to deal with anomalies (getting it always 19.2 across the board would neutralize domrect in lineheight)?
I cherry-picked the patches onto tor-browser-85.0b1-10.5-1, too, including my fixup commit (9103b99a).
@acat: There is a discussion in #30832 (comment 2664115) f. If there are follow-up items to work on could you file additional tickets? Otherwise please close this bug.