[BUGFIX canary] Since AutoLocation's use of window.history/location is mostly untestable this refactors the tests so that we make sure #9958, #9956 don't regress again