Bug 841422 - Move unit tests for shared code out of gallery