Closed Bug 1362816 Opened 8 years ago Closed 8 years ago

chrome/test/unit/test_data_protocol_registration.js and test_no_remote_registration.js fail when collecting code coverage on linux64-jsdcov.

Categories

(Toolkit :: Startup and Profile System, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla55
Tracking Status
firefox55 --- fixed

People

(Reporter: sparky, Assigned: sparky)

Details

Attachments

(2 files)

Attached file live_backing.log
The error that is available in the attached log or viewable in [1] is caused by something that happens in these tests. From some initial investigations, the file 'test_no_remote_registration.js' gives the error after the factories are unregistered. [2] shows a test run with the removal of the unregistering section. The same can't be said for 'test_data_protocol_registration.js' though as it continues to cause 'CoverageUtils.jsm' to fail when attempting to import 'osfile.jsm' through 'Components.utils.import'. [1]: https://treeherder.mozilla.org/#/jobs?repo=try&revision=f96599db4d59daf6de31cd054ad520a2bb5f4d00&selectedJob=97125519 [2]: https://treeherder.mozilla.org/#/jobs?repo=try&revision=80b3e4fb7de99e0718f13c0b1d45ad5d91468e1c&selectedJob=97013958
Assignee: nobody → gmierz2
Here's a simple patch: https://treeherder.mozilla.org/#/jobs?repo=try&revision=72dd9dc758e61c7b2cab11b05e3d67e3d14902e9 It turns out the the only reason 'test_data_protocol_registration.js' failed after removing the unregistering section was because it was missing XULAppInfo. Now we just need to find another way of unregistering the factories rather than simply removing that part completely.
This patch should do it: https://hg.mozilla.org/try/rev/3a83b8c960b60cedee4e7f252f181a229676e83e The solution was to store an already registered object with a specific contractID, unregister it, register the one needed for the test (with the same contractID but different classID), then re-register the previous object. If the test run goes well, I'll submit it for review.
Joel, would you be able to review this patch? If not, can you tell me who I should flag as a reviewer for this? The tests that are running with the current patch is in comment 2. Also, should I run a test with this patch on all platforms?
Flags: needinfo?(jmaher)
I am happy to review it!
Flags: needinfo?(jmaher)
Comment on attachment 8870882 [details] Bug 1362816 - Prevent test_data_protocol_registration.js and test_no_remote_registration.js from overwriting previously registered factories. https://reviewboard.mozilla.org/r/142418/#review146062 please make sure this runs reliably on all platforms (linux, osx, windows, android): try -b do -p all -u xpcshell -t none
Attachment #8870882 - Flags: review?(jmaher) → review+
Pushed by jmaher@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/5af5e8933e62 Prevent test_data_protocol_registration.js and test_no_remote_registration.js from overwriting previously registered factories. r=jmaher
Status: UNCONFIRMED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla55
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: