Bug 1039643: Write unit tests for contacts.js

Same for the number.