Bug 1094320 - rich markup

this way to spy does not really make me happy but I don't see a better way. I also thought of spying getCachedContext but I don't think it's better...