Currently, to prevent need of setting up user prefs in every test that
want to interact with quick_unlock, there's an EnabledForTesting API
that sets a global test flag to override all checks. But there are more
than one purposes an auth method can be used for, and also more than one
quick_unlock auth methods. Making the APIs and underlying mechanisms
more complicate can give tests more fine-grained control of what they
expect to be enabled in the test, and might help us capture some bugs in
code that accessed wrong set of purposes for auth methods. Put these
test apis into a TestApi class.
Bug: b:214871750
Test: CQ
Test: all modified unit tests, browser tests
Change-Id: I7d67fd8de77c35ab4bc36feec93b4c03bc48eacf
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3412557
Reviewed-by: Denis Kuznetsov <antrim@chromium.org>
Reviewed-by: Jon Mann <jonmann@chromium.org>
Commit-Queue: Howard Yang <hcyang@google.com>
Cr-Commit-Position: refs/heads/main@{#973440}