Add more tests for corner cases in role.

Also fixes the wrong assumption that the browser role must be
visible. Currently there isn't a role that must be visible.

Bug: 11417844
Test: presubmit
Change-Id: Ibfdb7d86b2e4d32b0ecf138a889e8e50a9601f19
2 files changed