Bug 945192. r=rstrong
imported patch bug945192_tests.diff