re-factored tests for unique ids to use promises.
Merge pull request #931 from canuckistani/bug_859637

Bug 859637: re-factored tests for unique ids to use promises. r=@ochameau