Refactor Firefox Mobile tests and fix Samsung Android Browser tests