Bug 1067411 - Enable waiting for popup animations as bug 994117 is fixed and expose the method as a more general one. r=aeftimie, r=amatei, r=hskupin

--HG--
branch : mozilla-beta
extra : transplant_source : 2hR%E4d%C1%AAJ%09%07q%A1%89%EBY%97%84%3C%99%E6