Fixes MatchFlagTests for non-browser devices

This change modifies the MatchFlagTests to pass on non-browser devices
by branching the verification based on whether devices exist

Fixes: 158095408
Test: atest MatchFlagTests
Change-Id: Id0b57da76e2c069ab53ee9370b58b76b663f00f4
3 files changed