Intermittent failure in toolkit/components/console/hudservice/tests/browser/browser_webconsole_bug_595934_message_categories.js | test #6: error category 'SVG' - Got chrome javascript, expected SVG

RESOLVED FIXED in Firefox 6

Status

defect
RESOLVED FIXED
8 years ago
Last year

People

(Reporter: Ehsan, Assigned: heycam)

Tracking

({intermittent-failure})

Trunk
Firefox 6
x86
Linux
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(3 attachments)

Reporter

Description

8 years ago
http://tinderbox.mozilla.org/showlog.cgi?log=Firefox/1301103892.1301105180.20076.gz
Rev3 Fedora 12 mozilla-central opt test mochitest-other on 2011/03/25 18:44:52

TEST-START | chrome://mochitests/content/browser/toolkit/components/console/hudservice/tests/browser/browser_webconsole_bug_595934_message_categories.js
TEST-PASS | chrome://mochitests/content/browser/toolkit/components/console/hudservice/tests/browser/browser_webconsole_bug_595934_message_categories.js | test #0: message found 'text/css'
TEST-PASS | chrome://mochitests/content/browser/toolkit/components/console/hudservice/tests/browser/browser_webconsole_bug_595934_message_categories.js | test #0: error category 'CSS Loader'
TEST-INFO | chrome://mochitests/content/browser/toolkit/components/console/hudservice/tests/browser/browser_webconsole_bug_595934_message_categories.js | Console message: [JavaScript Error: "The stylesheet http://example.com/browser/toolkit/components/console/hudservice/tests/browser/test-bug-595934-css-loader.css was not loaded because its MIME type, "image/png", is not "text/css"." {file: "http://example.com/browser/toolkit/components/console/hudservice/tests/browser/test-bug-595934-css-loader.html" line: 0}]
TEST-PASS | chrome://mochitests/content/browser/toolkit/components/console/hudservice/tests/browser/browser_webconsole_bug_595934_message_categories.js | test #1: message found 'preventBubble()'
TEST-PASS | chrome://mochitests/content/browser/toolkit/components/console/hudservice/tests/browser/browser_webconsole_bug_595934_message_categories.js | test #1: error category 'DOM Events'
TEST-INFO | chrome://mochitests/content/browser/toolkit/components/console/hudservice/tests/browser/browser_webconsole_bug_595934_message_categories.js | Console message: [JavaScript Warning: "Event=DOMContentLoaded, use of preventBubble() is deprecated. Use W3C standard stopPropagation() instead." {file: "http://example.com/browser/toolkit/components/console/hudservice/tests/browser/test-bug-595934-dom-events.html" line: 0}]
TEST-PASS | chrome://mochitests/content/browser/toolkit/components/console/hudservice/tests/browser/browser_webconsole_bug_595934_message_categories.js | test #2: message found 'getElementById'
TEST-PASS | chrome://mochitests/content/browser/toolkit/components/console/hudservice/tests/browser/browser_webconsole_bug_595934_message_categories.js | test #2: error category 'DOM:HTML'
TEST-INFO | chrome://mochitests/content/browser/toolkit/components/console/hudservice/tests/browser/browser_webconsole_bug_595934_message_categories.js | Console message: [JavaScript Warning: "Non-standard document.all property was used. Use W3C standard document.getElementById() instead." {file: "http://example.com/browser/toolkit/components/console/hudservice/tests/browser/test-bug-595934-dom-html.html" line: 8}]
TEST-PASS | chrome://mochitests/content/browser/toolkit/components/console/hudservice/tests/browser/browser_webconsole_bug_595934_message_categories.js | test #3: message found 'shape="rect"'
TEST-PASS | chrome://mochitests/content/browser/toolkit/components/console/hudservice/tests/browser/browser_webconsole_bug_595934_message_categories.js | test #3: error category 'ImageMap'
TEST-INFO | chrome://mochitests/content/browser/toolkit/components/console/hudservice/tests/browser/browser_webconsole_bug_595934_message_categories.js | Console message: [JavaScript Warning: "The "coords" attribute of the <area shape="rect"> tag is not in the "left,top,right,bottom" format." {file: "http://example.com/browser/toolkit/components/console/hudservice/tests/browser/test-bug-595934-imagemap.html" line: 0 column: 0 source: "coords="0,0,10,10,5""}]
TEST-PASS | chrome://mochitests/content/browser/toolkit/components/console/hudservice/tests/browser/browser_webconsole_bug_595934_message_categories.js | test #3: message found 'shape="rect"'
TEST-PASS | chrome://mochitests/content/browser/toolkit/components/console/hudservice/tests/browser/browser_webconsole_bug_595934_message_categories.js | test #5: message found 'no element found'
TEST-PASS | chrome://mochitests/content/browser/toolkit/components/console/hudservice/tests/browser/browser_webconsole_bug_595934_message_categories.js | test #5: error category 'malformed-xml'
TEST-INFO | chrome://mochitests/content/browser/toolkit/components/console/hudservice/tests/browser/browser_webconsole_bug_595934_message_categories.js | Console message: [JavaScript Error: "no element found" {file: "http://example.com/browser/toolkit/components/console/hudservice/tests/browser/test-bug-595934-malformedxml.xhtml" line: 11}]
TEST-UNEXPECTED-FAIL | chrome://mochitests/content/browser/toolkit/components/console/hudservice/tests/browser/browser_webconsole_bug_595934_message_categories.js | test #6: error category 'SVG' - Got chrome javascript, expected SVG
TEST-INFO | chrome://mochitests/content/browser/toolkit/components/console/hudservice/tests/browser/browser_webconsole_bug_595934_message_categories.js | Console message: [JavaScript Error: "TESTS[pos].onload is not a function" {file: "chrome://mochitests/content/browser/toolkit/components/console/hudservice/tests/browser/browser_webconsole_bug_595934_message_categories.js" line: 166}]
INFO TEST-END | chrome://mochitests/content/browser/toolkit/components/console/hudservice/tests/browser/browser_webconsole_bug_595934_message_categories.js | finished in 675ms
Reporter

Comment 1

8 years ago
Happened on the same revision and platform as bug 645267.
See Also: → 645267
Comment hidden (Legacy TBPL/Treeherder Robot)
Comment hidden (Legacy TBPL/Treeherder Robot)
Comment hidden (Legacy TBPL/Treeherder Robot)
Comment hidden (Legacy TBPL/Treeherder Robot)
Blocks: 595934
Version: unspecified → Trunk
Comment hidden (Legacy TBPL/Treeherder Robot)
Comment hidden (Legacy TBPL/Treeherder Robot)
Comment hidden (Legacy TBPL/Treeherder Robot)
Assignee

Comment 9

8 years ago
In testNext, the function passed to addEventListener closes over the pos variable, but I'm guessing that it could be incremented before the event listener is actually invoked.  You can see right after the TEST-UNEXPECTED-FAIL in comment 0 the "TESTS[pos].onload is not a function" message, so it looks like pos is going wrong.

This patch uses 'let' to capture the value of pos.
Assignee: nobody → cam
Status: NEW → ASSIGNED
Attachment #526935 - Flags: review?(ehsan)
Reporter

Comment 10

8 years ago
Comment on attachment 526935 [details] [diff] [review]
patch to maybe fix the randomness

Makes sense.  r=me.
Attachment #526935 - Flags: review?(ehsan) → review+
Assignee

Comment 11

8 years ago
http://hg.mozilla.org/mozilla-central/rev/de5a3db2d9c0
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 6
http://tinderbox.mozilla.org/showlog.cgi?log=Try/1303678697.1303679923.26400.gz (a try push parented on m-c tip) says there's a disappointment headed your way.
Assignee

Comment 13

8 years ago
Boo.  Let's dump the unexpected error console message to see what it's getting.
Attachment #528039 - Flags: review?(ehsan)
Assignee

Updated

8 years ago
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
I have a hunch what's happening here.

There have been some patches in Web Console which made the code somewhat more flimsy. It spits out errors when it shouldn't.

Those errors intervene in the way the test for bug 595934 works.

The fix should be in other parts of the Web Console, not in the test.

One such example error:

TEST-INFO | chrome://mochitests/content/browser/toolkit/components/console/hudservice/tests/browser/browser_webconsole_view_source.js | Console message: [JavaScript Error: "[Exception... "'JavaScript component does not have a method named: "observe"' when calling method: [nsIObserver::observe]"  nsresult: "0x80570030 (NS_ERROR_XPC_JSOBJECT_HAS_NO_FUNCTION_NAMED)"  location: "JS frame :: resource:///modules/HUDService.jsm :: HS_registerHUDReference :: line 1704"  data: no]" {file: "resource:///modules/HUDService.jsm" line: 1704}]


registerHUDReference() holds:

Services.obs.notifyObservers(id, "web-console-created", null);

There must be an observer registered that does not have the "observe" method.
Attachment #528039 - Flags: review?(ehsan) → review+
Reporter

Comment 16

8 years ago
Mihai, is what you're talking about in comment 14 something which could have caused bug 645267 as well?
(In reply to comment #16)
> Mihai, is what you're talking about in comment 14 something which could have
> caused bug 645267 as well?

I highly doubt that, I am 99% sure that comment 14 is unrelated to bug 645267.

However I am quite certain that that comment is sufficiently accurate - I continue to believe this orange is caused by what I said in the aforementioned comment. Someone can track the regression, when the code was added, and why the error occurs. Once we fix that error, I expect we will no longer see intermittent failures in the test discussed in this bug report.

If wanted, I can take the bug.
Assignee

Comment 18

8 years ago
From the debug log, I'm thinking the problem is that the load event listener is getting called for the previous subtest's document load -- the loop comes around to running subtest #4 (the one with the onload), but this sometimes happens before the document from subtest #3 has finished loading (i.e. the console message gets shown before the document's load event is dispatched).  This would be why the querySelector("form") call is not returning an element.

Patch coming up after a tryserver run.
Reporter

Comment 20

8 years ago
(In reply to comment #18)
> From the debug log, I'm thinking the problem is that the load event listener is
> getting called for the previous subtest's document load -- the loop comes
> around to running subtest #4 (the one with the onload), but this sometimes
> happens before the document from subtest #3 has finished loading (i.e. the
> console message gets shown before the document's load event is dispatched). 
> This would be why the querySelector("form") call is not returning an element.

This makes sense to me.  Relying on the order of load events is a mistake, as we all know.  :-)
Comment hidden (Legacy TBPL/Treeherder Robot)
Comment hidden (Legacy TBPL/Treeherder Robot)
Comment on attachment 529324 [details] [diff] [review]
Random orange fix for browser_webconsole_bug_595934_message_categories.js; make sure we listen for the right load event.

The patch change is fine, but I am not sure if these changes are sufficient.
Attachment #529324 - Flags: review?(mihai.sucan) → review+
Assignee

Comment 24

8 years ago
Thanks, landed: http://hg.mozilla.org/mozilla-central/rev/11a6a67cf3a9
Status: REOPENED → RESOLVED
Closed: 8 years ago8 years ago
Resolution: --- → FIXED
Comment hidden (Legacy TBPL/Treeherder Robot)
Comment hidden (Legacy TBPL/Treeherder Robot)
Comment hidden (Legacy TBPL/Treeherder Robot)
Whiteboard: [orange]

Updated

Last year
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.