Closed Bug 589961 Opened 10 years ago Closed 10 years ago

test-hidden-frame.testFrame failure on Firefox 3.6

Categories

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

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: myk, Assigned: myk)

References

Details

Attachments

(1 file)

I'm seeing a test failure in test-hidden-frame when run against Firefox 3.6:

error: TEST FAILED: test-hidden-frame.testFrame (failure)
error: fail: HiddenFrame loads about:blank by default. (null != "about:blank")
info: Traceback (most recent call last):
  File "resource://jetpack-core-jetpack-core-lib/hidden-frame.js", line 153, in createElement
    errors.catchAndLog(function () handler.call(frame))();
  File "resource://jetpack-core-jetpack-core-lib/errors.js", line 49, in anonymous
    return callback.apply(this, arguments);
  File "resource://jetpack-core-jetpack-core-lib/hidden-frame.js", line 153, in anonymous
    errors.catchAndLog(function () handler.call(frame))();
  File "resource://jetpack-core-jetpack-core-tests/test-hidden-frame.js", line 9, in anonymous
    "HiddenFrame loads about:blank by default.");
  File "resource://jetpack-core-jetpack-core-lib/unit-test.js", line 231, in assertEqual
    this.fail(message);
  File "resource://jetpack-core-jetpack-core-lib/unit-test.js", line 149, in fail
    console.trace();

The problem doesn't occur on trunk nightly builds.
Taking, I know the fix for this.
Assignee: nobody → myk
Status: NEW → ASSIGNED
Like page-worker, hidden-frame should wait to call onReady until DOMContentLoaded.
Attachment #468525 - Flags: review?(avarma)
Comment on attachment 468525 [details] [diff] [review]
patch v1: fixes problem

Looks good. I assume that if the addon is unloaded between the time that the DOMContentLoaded listener is registered and when the event actually fires, nothing bad will happen? e.g., the parent window will just go away and the listener will never be triggered?
Attachment #468525 - Flags: review?(avarma) → review+
(In reply to comment #3)
> Comment on attachment 468525 [details] [diff] [review]
> patch v1: fixes problem
> 
> Looks good. I assume that if the addon is unloaded between the time that the
> DOMContentLoaded listener is registered and when the event actually fires,
> nothing bad will happen? e.g., the parent window will just go away and the
> listener will never be triggered?

Yes, that is entrained by the removal of the element from the window on unload.

Fixed by changeset https://hg.mozilla.org/labs/jetpack-sdk/rev/37288479d249.
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
The Add-on SDK is no longer a Mozilla Labs experiment and has become a big enough project to warrant its own Bugzilla product, so the "Add-on SDK" product has been created for it, and I am moving its bugs to that product.

To filter bugmail related to this change, filter on the word "looptid".
Component: Jetpack SDK → General
Product: Mozilla Labs → Add-on SDK
QA Contact: jetpack-sdk → general
You need to log in before you can comment on or make changes to this bug.