I guess we would need the same branching logic in the test case as well or this will fail in browsers.