Bug 1039643: Write unit tests for contacts.js