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

RESOLVED FIXED in mozilla11

Status

()

defect
RESOLVED FIXED
8 years ago
8 years ago

People

(Reporter: heycam, Assigned: heycam)

Tracking

(Blocks 1 bug)

Trunk
mozilla11
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

Assignee

Description

8 years ago
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
Assignee

Updated

8 years ago
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.
Assignee

Comment 2

8 years ago
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: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla11
You need to log in before you can comment on or make changes to this bug.