[BrowserTest] rubocop change to an if()

Change-Id: I5ae9ec4d94af88fa67ac8de58a38b6ea03b14acc