-
Vaclav Brozek authored
Tests are needed for viewing passwords in settings. Those tests need an easy way to mock PasswordUIView, which communicates with C++ in the production version. Therefore this CL does: (1) Define an interface, PasswordManagerHandler, for the public methods of PasswordUIView to be mocked in the tests (coming in https://crrev.com/c/797453). (2) Create PasswordManagerHandlerProvider which encapsulates the logic for managing observers, life-time and test-replacement of the PasswordManagerHandler implementations. (3) Lift SavedPasswordEntry to top level for reasons explained in its class comment. This CL should not change any functionality, so current test coverage is assumed to be sufficient for the new code. The new tests are postponed until https://crrev.com/c/797453, which also introduces other test utilities to make writing them less of a pain. Bug: 788701 Change-Id: I2b90a613065df50cad85de85ffa620a88df61a6e Reviewed-on: https://chromium-review.googlesource.com/806155 Commit-Queue: Vaclav Brozek <vabr@chromium.org> Reviewed-by:
Tommy Nyquist <nyquist@chromium.org> Cr-Commit-Position: refs/heads/master@{#522059}
0db267e9