This allows us to remove the timeout (which was there for these prefs) and makes the code a bit more explicit. Unconditionally making all tests wait for rAF causes some timing changes which cause some tests to time out / fail, see: https://treeherder.mozilla.org/jobs?repo=try&revision=3aef4c168c6ab7d762dd360f49d4f56dff686c03 So this only does it when changing the prefs that care about it. Fix some tests that were relying on the timeout to get this green. Differential Revision: https://phabricator.services.mozilla.com/D119040