• Martin Kreichgauer's avatar
    device/fido/mac: add fake environment for unit testing Touch ID code · a3c0f931
    Martin Kreichgauer authored
    This adds a ScopedTouchIdTestEnvironment class to allow convenient
    faking functionality of the Touch ID authenticator that requires
    hardware support or user interaction.
    
    TouchIdContext is modified to:
     - allow injection of fakes through TouchIdContext::Create, in order to
    disable fingerprint prompts;
     - allow overriding the value returned by
    TouchIdContext::TouchIdAvailable, which determines hardware support and
    configuration status for Touch ID.
    
    The Keychain wrapper class is modified to allow injection of a fake into
    the singleton returned by Keychain::GetInstance. (FakeKeychain
    implementation will be done in a follow-up CL).
    
    Change-Id: I1b801b5bbe9b787965a5958206e6772a9a5eb09a
    Reviewed-on: https://chromium-review.googlesource.com/1162946
    Commit-Queue: Martin Kreichgauer <martinkr@google.com>
    Reviewed-by: default avatarBalazs Engedy <engedy@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#582278}
    a3c0f931
fake_keychain.mm 1.2 KB