Open Bug 1948340 Opened 10 days ago Updated 4 days ago

Get automated tests running with newtab packaged as a built-in addon

Categories

(Firefox :: New Tab Page, task)

task

Tracking

()

ASSIGNED

People

(Reporter: mconley, Assigned: mconley)

References

(Blocks 2 open bugs)

Details

(Whiteboard: [hnt-trainhop])

Attachments

(1 file)

Out of the box, it looks like most of the browser mochitests will work properly, but the xpcshell tests will require some finessing to get the built-in addon properly installed and registered before the tests begin.

This alters the xpcshell tests for newtab to install/enable the New Tab built-in
addon if the build-time flag is set for it to be packaged that way. This is
because the addon does the work of mapping resource://newtab and chrome://newtab
URIs to the addon package.

Since the xpcshell tests are testing modules for the most part, they also had
to be modified to lazily load those modules, rather than statically importing
them at the top of the file. This is so that the add_setup() in head.js has a
chance to run before any of the imports occur.

Assignee: nobody → mconley
Status: NEW → ASSIGNED
Blocks: 1949533
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: