Make SpecialPowers permission APIs accept a chrome document
test fixes