desktop-pwas: Rewrite fake BookmarkAppInstallation in PendingAppManager tests

Previously a PendingBookmarkAppManager could be created with either
installation tasks that always succeeded or with installation tasks that
always failed. This made writing tests that needed some tasks to fail
and some to succeed impossible to write.

This CL changes how fake tasks are created and allows tests to control
the result of each specific task.

Bug: 916381
Change-Id: Ie10b5fd8866713414d3878ce7dd38615a2aec44f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1615041
Commit-Queue: Giovanni Ortuño Urquidi <ortuno@chromium.org>
Reviewed-by: Alexey Baskakov <loyso@chromium.org>
Cr-Commit-Position: refs/heads/master@{#661240}
1 file changed