Closed Bug 730551 Opened 12 years ago Closed 12 years ago

[SeaMonkey] TEST-UNEXPECTED-FAIL | chrome://mochitests/content/browser/toolkit/mozapps/extensions/test/xpinstall/browser_bug638292.js | an unexpected uncaught JS exception reported through window.onerror - doc.getElementById("enabled") is null at ..."

Categories

(Toolkit :: Add-ons Manager, defect, P2)

defect

Tracking

()

VERIFIED FIXED
mozilla13
Tracking Status
firefox10 --- wontfix
firefox11 --- verified
firefox12 --- verified
firefox-esr10 --- wontfix

People

(Reporter: sgautherie, Assigned: sgautherie)

References

(Blocks 1 open bug, )

Details

(Whiteboard: [perma-orange])

Attachments

(2 files, 1 obsolete file)

http://tinderbox.mozilla.org/showlog.cgi?log=SeaMonkey-Aurora/1330135221.1330139643.6408.gz
Linux comm-aurora debug test mochitest-other on 2012/02/24 18:00:21  
http://tinderbox.mozilla.org/showlog.cgi?log=SeaMonkey-Aurora/1330111780.1330116495.23363.gz
WINNT 5.2 comm-aurora debug test mochitest-other on 2012/02/24 11:29:40
+
http://tinderbox.mozilla.org/showlog.cgi?log=SeaMonkey/1330121294.1330126569.11375.gz
OS X 10.6 comm-central-trunk debug test mochitest-other on 2012/02/24 14:08:14
http://tinderbox.mozilla.org/showlog.cgi?log=SeaMonkey/1330125193.1330132229.22777.gz
WINNT 5.2 comm-central-trunk debug test mochitest-other on 2012/02/24 15:13:13
{
TEST-UNEXPECTED-FAIL | chrome://mochitests/content/browser/toolkit/mozapps/extensions/test/xpinstall/browser_bug638292.js | an unexpected uncaught JS exception reported through window.onerror - doc.getElementById("enabled") is null at chrome://mochitests/content/browser/toolkit/mozapps/extensions/test/xpinstall/browser_bug638292.js:21
TEST-UNEXPECTED-FAIL | chrome://mochitests/content/browser/toolkit/mozapps/extensions/test/xpinstall/browser_bug638292.js | Test timed out
TEST-UNEXPECTED-FAIL | chrome://mochitests/content/browser/toolkit/mozapps/extensions/test/xpinstall/browser_bug638292.js | Found a tab after previous test timed out: http://example.com/browser/toolkit/mozapps/extensions/test/xpinstall/enabled.html
TEST-UNEXPECTED-FAIL | chrome://mochitests/content/browser/toolkit/mozapps/extensions/test/xpinstall/browser_bug638292.js | Found a tab after previous test timed out: http://example.com/browser/toolkit/mozapps/extensions/test/xpinstall/bug638292.html
}

I reproduce on my local Windows 2000.

NB: I assume SeaMonkey 2.8 (= mozilla11) is affected too, though our current log stops (long) before executing this test :-/
Depends on: 638292
Assignee: nobody → sgautherie.bz
Status: NEW → ASSIGNED
On my local Windows 2000, with Opt builds:
FF 13 does 0 intermediate load, SM 2.10 does 2(-3) intermediate loads.

Asking Neil, just as a reminder whether SeaMonkey could get rid of that behavior :-| (I expect the answer to (still) be 'no', but...)
Attachment #600648 - Flags: review?(robert.bugzilla)
Attachment #600648 - Flags: feedback?(neil)
Comment on attachment 600648 [details] [diff] [review]
(Av1) browser_bug638292.js: Support SeaMonkey's "about:blank" loads
[Checked in: Comments 3 and 16]

passing the review over to Blair since my review queue is rather full atm.
Attachment #600648 - Flags: review?(robert.bugzilla) → review?(bmcbride)
Attachment #600648 - Flags: review?(bmcbride) → review+
Comment on attachment 600648 [details] [diff] [review]
(Av1) browser_bug638292.js: Support SeaMonkey's "about:blank" loads
[Checked in: Comments 3 and 16]

https://hg.mozilla.org/mozilla-central/rev/d1b2fd680235


[Approval Request Comment]
Regression caused by (bug #): Bug 638292.
User impact if declined: None, but perma-orange (timeout) on SeaMonkey.
Testing completed (on m-c, etc.): Comment 1 and this comment.
Risk to taking this patch (and alternatives if risky): None, test only.
String changes made by this patch: None.
Attachment #600648 - Attachment description: (Av1) browser_bug638292.js: Support SeaMonkey's "about:blank" loads → (Av1) browser_bug638292.js: Support SeaMonkey's "about:blank" loads [Checked in: Comment 3]
Attachment #600648 - Flags: approval-mozilla-beta?
Attachment #600648 - Flags: approval-mozilla-aurora?
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
No longer depends on: OrangeFactorCommApps
Flags: in-testsuite+
Resolution: --- → FIXED
Comment on attachment 600648 [details] [diff] [review]
(Av1) browser_bug638292.js: Support SeaMonkey's "about:blank" loads
[Checked in: Comments 3 and 16]

Sorry for overlooking the feedback request.

These aren't about:blank loads, but the test was wrong in thinking that its capturing load event handler would only capture the load event that it was interested in... the correct test is something like
if (aEvent.target != gBrowser.browsers[2].contentDocument)
  return;
Attachment #600648 - Flags: feedback?(neil) → feedback-
(In reply to Serge Gautherie (:sgautherie) from comment #3)
> https://hg.mozilla.org/mozilla-central/rev/d1b2fd680235

http://tinderbox.mozilla.org/showlog.cgi?log=SeaMonkey/1330337923.1330342430.26680.gz
WINNT 5.2 comm-central-trunk debug test mochitest-other on 2012/02/27 02:18:43

V.Fixed
Status: RESOLVED → VERIFIED
(In reply to neil@parkwaycc.co.uk from comment #4)

> Sorry for overlooking the feedback request.

(No problem.)

> These aren't about:blank loads, but the test was wrong in thinking that its

Wrong guess on my part :-/

> capturing load event handler would only capture the load event that it was

Ftr, the additional SM events have |aEvent.target.localName = "tabbrowser"| and the expected SM load event has 'null'.

> interested in... the correct test is something like
> if (aEvent.target != gBrowser.browsers[2].contentDocument)

Ftr, gBrowser.browsers[2] is null the very first time.
Attachment #600865 - Flags: review?(neil)
Attachment #600865 - Flags: feedback?(bmcbride)
(In reply to Serge Gautherie from comment #6)
> > capturing load event handler would only capture the load event that it was
> Ftr, the additional SM events have |aEvent.target.localName = "tabbrowser"|
More usefully, aEvent.originalTarget.localName == "image"

> and the expected SM load event has 'null'.
Well, the expected event is a document.

> Ftr, gBrowser.browsers[2] is null the very first time.
Ah, so maybe not such a good idea then.
Comment on attachment 600865 [details] [diff] [review]
(Bv1) browser_bug638292.js: Make SeaMonkey support more specific

Personally I think this is overkill, but if I think of a better test than !aEvent.target.location then I'll let you know.
Attachment #600865 - Flags: review?(neil) → review-
Comment on attachment 600865 [details] [diff] [review]
(Bv1) browser_bug638292.js: Make SeaMonkey support more specific

(In reply to neil@parkwaycc.co.uk from comment #7)

> More usefully, aEvent.originalTarget.localName == "image"

What is this image(s)? Would there be a way to disable its load(s)?

> > Ftr, gBrowser.browsers[2] is null the very first time.
> Ah, so maybe not such a good idea then.

Yeah, that's why I ended up using "!aEvent.target.location" :-|


(In reply to neil@parkwaycc.co.uk from comment #8)
> Personally I think this is overkill

As my initial documentation (wrt "about:blank") was wrong, let's improve it.
In addition, I (now) think it's better to check for SeaMonkey too, to keep default case as strict as it was. (= Let it fail in case of a future regression.)
Wrt gBrowser.browsers[2] conditions, as well be more explicit...
Attachment #600865 - Flags: review?(neil)
(In reply to Serge Gautherie from comment #9)
> (In reply to neil@parkwaycc.co.uk from comment #7)
> > More usefully, aEvent.originalTarget.localName == "image"
> What is this image(s)? Would there be a way to disable its load(s)?
It's the image element on the tab that displays the favicon or default icon.

> (In reply to neil@parkwaycc.co.uk from comment #8)
> > Personally I think this is overkill
> As my initial documentation (wrt "about:blank") was wrong, let's improve it.
> In addition, I (now) think it's better to check for SeaMonkey too, to keep
> default case as strict as it was. (= Let it fail in case of a future
> regression.)
> Wrt gBrowser.browsers[2] conditions, as well be more explicit...
Well I suggest that's really up to the module owner...
Comment on attachment 600865 [details] [diff] [review]
(Bv1) browser_bug638292.js: Make SeaMonkey support more specific

(In reply to neil@parkwaycc.co.uk from comment #10)
> (In reply to Serge Gautherie from comment #9)
> > What is this image(s)? Would there be a way to disable its load(s)?
> It's the image element on the tab that displays the favicon or default icon.

(Ftr/fwiw, I tried to disable browser.chrome.favicons and browser.chrome.site_icons, but that didn't help.)
Attachment #600865 - Flags: review?(neil)
Attachment #600865 - Flags: review?(bmcbride)
Attachment #600865 - Flags: feedback?(bmcbride)
Comment on attachment 600648 [details] [diff] [review]
(Av1) browser_bug638292.js: Support SeaMonkey's "about:blank" loads
[Checked in: Comments 3 and 16]

[Triage Comment]
Test only change - approved for Aurora 12 and Beta 11.
Attachment #600648 - Flags: approval-mozilla-beta?
Attachment #600648 - Flags: approval-mozilla-beta+
Attachment #600648 - Flags: approval-mozilla-aurora?
Attachment #600648 - Flags: approval-mozilla-aurora+
Comment on attachment 600865 [details] [diff] [review]
(Bv1) browser_bug638292.js: Make SeaMonkey support more specific

Review of attachment 600865 [details] [diff] [review]:
-----------------------------------------------------------------

::: toolkit/mozapps/extensions/test/xpinstall/browser_bug638292.js
@@ +13,5 @@
>  
>  function check_load(aCallback) {
>    gBrowser.addEventListener("load", function(aEvent) {
> +    // SeaMonkey tabbrowser needs to deal with additional loads.
> +    if (navigator.userAgent.match(/ SeaMonkey\//) &&

I really like to avoid application-specific code, even in tests. And having it test it's the right document seems proper anyway.

Why is gBrowser.browsers[2] null the first time?
Attachment #600865 - Flags: review?(bmcbride) → review-
Bv1, with comment 13 suggestion(s).


(In reply to Blair McBride (:Unfocused) from comment #13)

> I really like to avoid application-specific code, even in tests. And having

Well, SeaMonkey has some specific behaviors, so it's needed sometimes.

> it test it's the right document seems proper anyway.

Done.

> Why is gBrowser.browsers[2] null the first time?

I have no idea wrt the exact order of things on SeaMonkey. Just accounting for it.
Attachment #600865 - Attachment is obsolete: true
Attachment #601221 - Flags: review?(bmcbride)
Keywords: checkin-needed
Whiteboard: [perma-orange] → [c-n: d1b2fd680235 to m-a and m-b] [perma-orange]
(In reply to Serge Gautherie (:sgautherie) from comment #14)
> > Why is gBrowser.browsers[2] null the first time?
> 
> I have no idea wrt the exact order of things on SeaMonkey. Just accounting
> for it.

Any idea about this, Neil?
Comment on attachment 600648 [details] [diff] [review]
(Av1) browser_bug638292.js: Support SeaMonkey's "about:blank" loads
[Checked in: Comments 3 and 16]

http://hg.mozilla.org/releases/mozilla-aurora/rev/27165fe21717
http://hg.mozilla.org/releases/mozilla-beta/rev/1f861eb71d15
Attachment #600648 - Attachment description: (Av1) browser_bug638292.js: Support SeaMonkey's "about:blank" loads [Checked in: Comment 3] → (Av1) browser_bug638292.js: Support SeaMonkey's "about:blank" loads [Checked in: Comments 3 and 16]
Keywords: checkin-needed
Whiteboard: [c-n: d1b2fd680235 to m-a and m-b] [perma-orange] → [perma-orange]
(In reply to Jens Hatlak (:InvisibleSmiley) from comment #16)

> http://hg.mozilla.org/releases/mozilla-beta/rev/1f861eb71d15

http://tinderbox.mozilla.org/showlog.cgi?log=SeaMonkey-Beta/1330489986.1330493973.10985.gz
OS X 10.6 comm-beta debug test mochitest-other on 2012/02/28 20:33:06

seamonkey2.8: verified.
(In reply to Jens Hatlak (:InvisibleSmiley) from comment #16)
> http://hg.mozilla.org/releases/mozilla-aurora/rev/27165fe21717

http://tinderbox.mozilla.org/showlog.cgi?log=SeaMonkey-Aurora/1330509264.1330514338.13867.gz
Linux comm-aurora debug test mochitest-other on 2012/02/29 01:54:24

seamonkey2.9: verified.
(In reply to Blair McBride (:Unfocused) from comment #15)
> (In reply to Serge Gautherie (:sgautherie) from comment #14)
> > > Why is gBrowser.browsers[2] null the first time?
> > 
> > I have no idea wrt the exact order of things on SeaMonkey. Just accounting
> > for it.
> 
> Any idea about this, Neil?

Neil said this may not be unexpected.
Attachment #601221 - Flags: review?(bmcbride) → review+
Try run for fb519344328a is complete.
Detailed breakdown of the results available here:
    https://tbpl.mozilla.org/?tree=Try&rev=fb519344328a
Results (out of 27 total builds):
    success: 21
    warnings: 4
    failure: 2
Builds (or logs if builds failed) available at:
http://ftp.mozilla.org/pub/mozilla.org/firefox/try-builds/sgautherie.bz@free.fr-fb519344328a
Comment on attachment 601221 [details] [diff] [review]
(Bv2) browser_bug638292.js: Check load target, Make SeaMonkey support more specific
[Checked in: Comment 21]

https://hg.mozilla.org/mozilla-central/rev/14099190f012


(In reply to Mozilla RelEng Bot from comment #20)
>     https://tbpl.mozilla.org/?tree=Try&rev=fb519344328a

Succeeded.
Attachment #601221 - Attachment description: (Bv2) browser_bug638292.js: Check load target, Make SeaMonkey support more specific → (Bv2) browser_bug638292.js: Check load target, Make SeaMonkey support more specific [Checked in: Comment 21]
(In reply to Serge Gautherie (:sgautherie) from comment #21)
> https://hg.mozilla.org/mozilla-central/rev/14099190f012

http://tinderbox.mozilla.org/showlog.cgi?log=SeaMonkey/1331104973.1331111681.4909.gz&fulltext=1
Linux comm-central-trunk debug test mochitest-other on 2012/03/06 23:22:53

V.Fixed wrt this additional patch too.
(In reply to Blair McBride from comment #13)
> Why is gBrowser.browsers[2] null the first time?
You're actually seeing the load of the icon for the bug638292.html tab (remember that it just loaded, so we're switching from the loading icon to the default icon). I believe link clicking is asynchronous so that the new tab isn't created until after the event loop processes the icon load event.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: