Fix tests in firefox

These patches fix the four failing tests when running the test suite in firefox and should make dommy not fail on some features when running in firefox.