• Maksim Ivanov's avatar
    Add tests for new Gaia user's cryptohome label · b6c1d887
    Maksim Ivanov authored
    Extend the OobeTest.NewUser test to verify the parameters passed
    to the MountEx call to cryptohomed, including the verification
    that the key label is "gaia".
    
    To simulate the flow that is close to the real flow, the
    FakeCryptohomeClient class is slightly enhanced to support
    replying to MountEx with CRYPTOHOME_ERROR_ACCOUNT_NOT_FOUND when
    no "create" proto field is provided. This allows to achieve the
    simulation of the following flow:
    (1) Chrome calls MountEx for the new user without specifying
        |create|;
    (2) cryptohomed checks that this user doesn't exist, and replies
        with the CRYPTOHOME_ERROR_ACCOUNT_NOT_FOUND error;
    (3) Chrome sees this errors and repeats the MountEx request with
        specifying |create|;
    (4) cryptohomed creates the new mount and succeeds.
    
    Bug: 983103
    Test: browser_tests --gtest_filter=OobeTest.NewUser
    Change-Id: If27bcb05187219e046025f469ffe8bfe5c214562
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1690880
    Commit-Queue: Maksim Ivanov <emaxx@chromium.org>
    Reviewed-by: default avatarRyo Hashimoto <hashimoto@chromium.org>
    Reviewed-by: default avatarRoman Sorokin [CET] <rsorokin@chromium.org>
    Reviewed-by: default avatarDenis Kuznetsov <antrim@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#678276}
    b6c1d887
fake_cryptohome_client.h 21.2 KB