Closed Bug 790659 Opened 12 years ago Closed 12 years ago

JS Error ReferenceError: addon is not defined

Categories

(Add-on SDK Graveyard :: General, defect, P1)

defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: evold, Assigned: zer0)

References

Details

Attachments

(1 file)

When I run `cfx test` I see the following error: [JavaScript Error: "ReferenceError: addon is not defined" {file: "resource://6253b599-1c6d-495f-b637-99479a49ec5d-at-jetpack/api-utils/data/test-trusted-document.html" line: 13}]
P1 to see if this is just part of the test, or if it's a problem in a test.
Priority: -- → P1
The error is given by the `test-content-symbiont`, when we're test if the `addon` object is present when a content script is given: https://github.com/mozilla/addon-sdk/blob/master/test/test-content-symbiont.js#L164-L170 Because the page loaded even in this test try to use `addon` object in any case: https://github.com/mozilla/addon-sdk/blob/master/data/test-trusted-document.html#L12-L16 The exception is raised. I added a check on `test-trusted-document` to execute those line only if `addon` object is in `window`; that doesn't impact the result of the test because this is exactly what we're going to test anyway (that the `addon` object is not on `window`).
Attachment #712836 - Flags: review?(evold)
Assignee: nobody → zer0
Attachment #712836 - Flags: review?(evold) → review+
Commits pushed to master at https://github.com/mozilla/addon-sdk https://github.com/mozilla/addon-sdk/commit/f1af9a1b92be0f48917f6ee9c5eb59bd3b9f7ddf Bug 790659 - JS Error ReferenceError: addon is not defined - Added check on `test-trusted-document.html` before using `addon` object https://github.com/mozilla/addon-sdk/commit/5b321785a626fd9215d81292fce91766a2942a2b Merge pull request #783 from ZER0/addon/790659 Fix Bug 790659 - JS Error ReferenceError: addon is not defined r=@erikvold
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: