Closed Bug 866464 Opened 11 years ago Closed 11 years ago

Write window observer tests for Fennec

Categories

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

defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: evold, Assigned: jsantell)

References

Details

Attachments

(1 file)

We can't open new windows on Fennec so testing the window/observer module and various other modules that observe window events on Fennec is difficult.

We could merely test that using the APIs doesn't cause an error.  We could also create a custom Loader instance with fake window util modules.

The latter seems reasonable to me, in addition to running the current tests we have when they make sense (on anything not Fennec).
Is this necessary? What benefits would there be for using this module on Fennec? Right now it's just being skipped entirely. The window load event is probably fired before SDK is even loaded (which is the case for the initial tab on Fennec)
Flags: needinfo?(evold)
(In reply to Jordan Santell [:jsantell] [@jsantell] from comment #1)
> Is this necessary? What benefits would there be for using this module on
> Fennec? Right now it's just being skipped entirely. The window load event is
> probably fired before SDK is even loaded (which is the case for the initial
> tab on Fennec)

So testing that the module doesn't throw errors seems good enough to me, since it might be used in a add-on that is supposed to work on Fennec and Firefox.
Flags: needinfo?(evold)
Attached file GH PR 1165
Attachment #789766 - Flags: review?(evold)
Comment on attachment 789766 [details]
GH PR 1165

I'd like to see that adding observers does not cause a crash as well.
Attachment #789766 - Flags: review?(evold) → review-
(In reply to Erik Vold [:erikvold] [:ztatic] from comment #4)
> Comment on attachment 789766 [details]
> GH PR 1165
> 
> I'd like to see that adding observers does not cause a crash as well.

*cause an error

I have crashes on the mind, sorry.
Assignee: nobody → jsantell
Comment on attachment 789766 [details]
GH PR 1165

Ah, here we go -- adding observers. Also unbinding, looks like we were not doing that previously.
Attachment #789766 - Flags: review- → review?(evold)
Attachment #789766 - Flags: review?(evold) → review+
Commits pushed to master at https://github.com/mozilla/addon-sdk

https://github.com/mozilla/addon-sdk/commit/7762f9610bf7f997c123894de12fb346d33a457c
Bug 866464 test window-observer doesn't throw on Fennec

https://github.com/mozilla/addon-sdk/commit/a031a55986ce827854d0718b0ebfc4d39eb591f7
Merge pull request #1165 from jsantell/866464-test-fennec-window-observer

Fix Bug 866464 test window-observer doesn't throw on Fennec, r+=@erikvold
Status: NEW → RESOLVED
Closed: 11 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: