Closed
Bug 700190
Opened 13 years ago
Closed 13 years ago
Fix test_aboutmemory.xul
Categories
(Toolkit :: about:memory, defect)
Tracking
()
RESOLVED
FIXED
mozilla11
People
(Reporter: n.nethercote, Assigned: n.nethercote)
References
Details
Attachments
(1 file)
1.76 KB,
patch
|
justin.lebar+bug
:
review+
|
Details | Diff | Splinter Review |
When I run test_aboutmemory.xul I get this output on the console:
TEST-INFO | unknown test url | [SimpleTest/SimpleTest.js, window.onerror] An error occurred: actual.QueryInterface is not a function at chrome://mochitests/content/chrome/toolkit/components/aboutmemory/tests/chrome/test_aboutmemory.xul:370
JavaScript error: chrome://mochitests/content/chrome/toolkit/components/aboutmemory/tests/chrome/test_aboutmemory.xul, line 370: actual.QueryInterface is not a function
AFAICT the problem was introduced by bug 674290 -- the use of a validator function as the first argument of waitForClipboard() is wrong. I confirmed (with the current tip) that changing the expected output string does not cause the test to fail as it should, and only 1 thing is checked instead of the expected 3. Either this was broken from the start, or maybe waitForClipboard() changed?
Either way, the attached patch fixes things.
Attachment #572357 -
Flags: review?(justin.lebar+bug)
Comment 1•13 years ago
|
||
I think waitForClipboard changed. Which is good, because it was silly to make code QI like this. But it's bad that the test harness didn't catch this failure.
I guess the reason that this failure didn't cause the tree to burn is that the exception was inside checkClipboard? If we throw an exception outside checkClipboard, does the test fail?
r=me if exceptions in general cause this test to fail. Otherwise, we need a bigger hammer.
Updated•13 years ago
|
Attachment #572357 -
Flags: review?(justin.lebar+bug) → review+
Assignee | ||
Comment 2•13 years ago
|
||
I inserted |throw("foobar")| at the top-level of the JS code and this shows up in the console:
TEST-INFO | unknown test url | [SimpleTest/SimpleTest.js, window.onerror] An error occurred: uncaught exception: foobar at :0
but the test still passes. I could wrap everything in the try-block but it seems like the test framework should catch this.
Assignee | ||
Comment 3•13 years ago
|
||
bz tells me that chrome tests swallow uncaught exceptions. See bug 652494.
Assignee | ||
Comment 4•13 years ago
|
||
Comment 5•13 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla11
You need to log in
before you can comment on or make changes to this bug.
Description
•