Closed Bug 670858 Opened 13 years ago Closed 13 years ago

xpinstall tests have uncaught JS exceptions, which will cause test failures in the future

Categories

(Toolkit :: General, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla11

People

(Reporter: heycam, Assigned: heycam)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

A bunch of tests under toolkit/mozapps/xpinstall have uncaught JS exceptions.  With bug 652494, these exceptions will become fatal.  I haven't looked into whether these exceptions are expected or not, yet (it looks like some may be).

TEST-UNEXPECTED-FAIL | chrome://mochitests/content/browser/toolkit/mozapps/extensions/test/xpinstall/browser_badargs.js | [SimpleTest/SimpleTest.js, window.onerror] - An error occurred: uncaught exception: Error: Incorrect arguments passed to InstallTrigger.install() at :0
TEST-UNEXPECTED-FAIL | chrome://mochitests/content/browser/toolkit/mozapps/extensions/test/xpinstall/browser_badargs2.js | [SimpleTest/SimpleTest.js, window.onerror] - An error occurred: uncaught exception: Error: Missing URL property for 'Unsigned XPI' at :0
TEST-UNEXPECTED-FAIL | chrome://mochitests/content/browser/toolkit/mozapps/extensions/test/xpinstall/browser_cancel.js | [SimpleTest/SimpleTest.js, window.onerror] - An error occurred: self.runningInstalls is null at chrome://mochitests/content/browser/toolkit/mozapps/extensions/test/xpinstall/head.js:135
TEST-UNEXPECTED-FAIL | chrome://mochitests/content/browser/toolkit/mozapps/extensions/test/xpinstall/browser_enabled3.js | [SimpleTest/SimpleTest.js, window.onerror] - An error occurred: callback is not a function at chrome://mochitests/content/browser/toolkit/mozapps/extensions/test/xpinstall/head.js:154
TEST-UNEXPECTED-FAIL | chrome://mochitests/content/browser/toolkit/mozapps/extensions/test/xpinstall/browser_localfile2.js | [SimpleTest/SimpleTest.js, window.onerror] - An error occurred: uncaught exception: Error: insufficient permissions to install: [xpconnect wrapped nsIURI] at :0
TEST-UNEXPECTED-FAIL | chrome://mochitests/content/browser/toolkit/mozapps/extensions/test/xpinstall/browser_whitelist3.js | [SimpleTest/SimpleTest.js, window.onerror] - An error occurred: self.runningInstalls is null at chrome://mochitests/content/browser/toolkit/mozapps/extensions/test/xpinstall/head.js:135
Blocks: 702050
(In reply to Cameron McCormack (:heycam) (away 21 - around 30 November) from comment #0)
> A bunch of tests under toolkit/mozapps/xpinstall have uncaught JS
> exceptions.  With bug 652494, these exceptions will become fatal.  I haven't
> looked into whether these exceptions are expected or not, yet (it looks like
> some may be).
> 
> TEST-UNEXPECTED-FAIL |
> chrome://mochitests/content/browser/toolkit/mozapps/extensions/test/
> xpinstall/browser_badargs.js | [SimpleTest/SimpleTest.js, window.onerror] -
> An error occurred: uncaught exception: Error: Incorrect arguments passed to
> InstallTrigger.install() at :0
> TEST-UNEXPECTED-FAIL |
> chrome://mochitests/content/browser/toolkit/mozapps/extensions/test/
> xpinstall/browser_badargs2.js | [SimpleTest/SimpleTest.js, window.onerror] -
> An error occurred: uncaught exception: Error: Missing URL property for
> 'Unsigned XPI' at :0
> TEST-UNEXPECTED-FAIL |
> chrome://mochitests/content/browser/toolkit/mozapps/extensions/test/
> xpinstall/browser_cancel.js | [SimpleTest/SimpleTest.js, window.onerror] -
> An error occurred: self.runningInstalls is null at
> chrome://mochitests/content/browser/toolkit/mozapps/extensions/test/
> xpinstall/head.js:135

These two are definitely expected

> TEST-UNEXPECTED-FAIL |
> chrome://mochitests/content/browser/toolkit/mozapps/extensions/test/
> xpinstall/browser_localfile2.js | [SimpleTest/SimpleTest.js, window.onerror]
> - An error occurred: uncaught exception: Error: insufficient permissions to
> install: [xpconnect wrapped nsIURI] at :0

I think this is expected too

Not sure about the other 3 off the top of my head.
I agree with your assessment of the expected exceptions.

For browser_cancel.js, the problem is that Harness.endTest() is getting called
twice because the cancelDialog() call just above endTest() in head.js's
windowReady will end up calling endTest() anyway (through onDownloadCancelled).

The other problem was installsCompletedCallback being called from endTest()
regardless of whether such a callback was set by the test.
Attachment #578490 - Flags: review?(dtownsend)
Attachment #578490 - Flags: review?(dtownsend) → review+
When pushing to inbound, please can you set the assignee & target milestone (https://wiki.mozilla.org/Tree_Rules/Inbound#Please_do_the_following_after_pushing_to_inbound), thanks :-)

https://hg.mozilla.org/mozilla-central/rev/7f8401b9f746
Assignee: nobody → cam
Status: NEW → 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.

Attachment

General

Created:
Updated:
Size: