Lots of fixes to test framework for Firefox.