Bug 790659 - JS Error ReferenceError: addon is not defined

- Added check on `test-trusted-document.html` before using `addon` object
Merge pull request #783 from ZER0/addon/790659

Fix Bug 790659 - JS Error ReferenceError: addon is not defined r=@erikvold