Remove PrimaryAccountMutatorTest test fixture
The fixture made code more convoluted as the default test environment had to be created in the constructor (as the tests expected it) and then recreated afterwards for the ClearPrimaryAccount tests. Instead not using the fixture make the tests more straight-forward as the objects used by each individual tests are explicitly created. This adds some boilerplate, but logic of RunClearPrimaryAccountTest is now clear (previously you had to check in the test what the value of the account consistency method was, while now it is expliclty passed to the method). This follow the recommendation from the following tips of the week https://abseil.io/tips/122 that recommends avoiding fixtures. Bug: none Change-Id: Ia8af245f7b1a3bdeddb7a09fb9baa54a371b8512 Reviewed-on: https://chromium-review.googlesource.com/c/1363199 Commit-Queue: Sylvain Defresne <sdefresne@chromium.org> Reviewed-by:Colin Blundell <blundell@chromium.org> Reviewed-by:
Mario Sanchez Prada <mario@igalia.com> Cr-Commit-Position: refs/heads/master@{#615501}
Showing
This diff is collapsed.
Please register or sign in to comment