* Add a new module, NewPasswordModel.jsm, which imports the Fathom library from Bug 1618956, and copies over the Fathom model at [bff6995c32e86...](bff6995c32/new-password/rulesets.js (L6-L272)) into it.
* This module is intended to make it as easy as possible to import model updates from the upstream GitHub repo, though there are a couple extra steps beyond a simple copy and paste.
* The module is imported into LoginAutoComplete.jsm, which has a new helper, _isProbablyANewPasswordField, which runs the model against the provided input element and returns true if the element's confidence score is greater than or equal to a threshold.
* The confidence threshold, specified by the new signon.generation.confidenceThreshold string preference, is currently set to 0.5 based on [this comment](https://bugzilla.mozilla.org/show_bug.cgi?id=1595244#c12).
* This should result in a dramatic reduction in false negative rates compared to the existing implementation of this feature (at the expense of an increase in the false positive rate of the existing feature from ~0% to hopefully around 2%).
* Use of the model is gated behind the same preference used for the confidence threshold, signon.generation.confidenceThreshold.
* This is a string pref that disables the model if its value is "-1". Otherwise, its value should be a string representation of a float [0,1] (e.g. "0.5") which indicates that the model should be enabled with the given confidence threshold.
* Using the model is enabled by default on desktop but disabled by default on mobile (GeckoView) due to Bug 1618058.
* Fixed some existing tests that were broken as a result of this change.
* New test(s) will be added in a subsequent commit.
Differential Revision: https://phabricator.services.mozilla.com/D67068
--HG--
extra : moz-landing-system : lando