bug951026 - Unit test WIP

https://bugzilla.mozilla.org/show_bug.cgi?id=951026