Add tests for new Gaia user's cryptohome label
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:Ryo Hashimoto <hashimoto@chromium.org> Reviewed-by:
Roman Sorokin [CET] <rsorokin@chromium.org> Reviewed-by:
Denis Kuznetsov <antrim@chromium.org> Cr-Commit-Position: refs/heads/master@{#678276}
Showing
Please register or sign in to comment