feder-cr
|
cf59e98fa9
|
test: fingerprint surface + consistency e2e tests
96 e2e tests reproducing the canonical anti-bot / fingerprinting
libraries' checks against a local InvisiblePlaywright session
on about:blank (no network).
Surface (28 tests):
- BotD: webdriver, app_version, UA tokens, function_bind, productSub,
process, eval.length, languages, plugins, mimeTypes, distinctive
window/document globals, html attributes, window size, webgl_debug
- sannysoft: chrome consistency, permissions.query, iframe chrome,
iframe languages
- FpJS: canvas 2D, audio offline, color-gamut, color-depth
- PIN-locked: screen.width/height, hw.concurrency, audio.sampleRate,
audio.maxChannelCount
- fpscanner: UA<->platform, no userAgentData on Firefox
Consistency (68 tests):
- Math determinism: 17 transcendentals + Math.pow
- Worker scope vs main: 5 navigator props via Blob worker
- Iframe scope vs window: 4 props + screen
- UA self-consistency: UA<->platform, UA<->oscpu, UA<->appVersion
- Native function self-toString: 8 native APIs
- AudioContext / WebGL determinism
- Locale<->Intl: DateTimeFormat / NumberFormat / Collator
- Descriptor shape lies: 16 navigator props (each must be a getter,
not Object.defineProperty(value=...))
- performance.timeOrigin + .now() monotonic
- Window dimension invariants
- Firefox UA invariants (vendor='', appName='Netscape',
appVersion short form)
All marked @pytest.mark.e2e so they're excluded from the default
suite that the pre-push hook runs. Invoke explicitly:
pytest -m e2e -v
Or against a local build:
INVPW_BINARY_PATH=/path/to/firefox.exe pytest -m e2e -v
Sources: github.com/fingerprintjs/BotD, abrahamjuliot/creepjs,
fingerprintjs/fingerprintjs, antoinevastel/fpscanner,
niespodd/browser-fingerprinting, bot.sannysoft.com.
Verified: 95 passed, 1 skipped (Chromium-only invariant), 0 failed
against firefox-5 local build.
|
2026-05-21 13:47:14 -07:00 |
|