[App Management] Add metadata view tests.

This CL adds tests for the pin to shelf toggle in the app management
metadata view. It also creates a test util file, and refactors some
tests to use these util functions.

Bug: 906508
Change-Id: Ica7f7ceb5b097effbbab544a7f7cc066c7a9074d
Reviewed-on: https://chromium-review.googlesource.com/c/1420077
Reviewed-by: calamity <calamity@chromium.org>
Reviewed-by: Ken Rockot <rockot@google.com>
Reviewed-by: Eric Willigers <ericwilligers@chromium.org>
Commit-Queue: calamity <calamity@chromium.org>
Cr-Commit-Position: refs/heads/master@{#626883}
20 files changed