Implement a reliable mock of BuiltInThemes and BuiltInThemeConfig for tests
Categories
(Firefox :: Theme, task)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox105 | --- | fixed |
People
(Reporter: kpatenio, Assigned: kpatenio)
References
Details
(Whiteboard: fidefe-colorway-closet )
Attachments
(1 file)
BuiltInThemes and BuiltInThemeConfig are utilized heavily for Colorway Closet. However, we do not have any "official" implementation of it to be used globally for tests.
Currently, there is an "unofficial" implementation in toolkit/mozapps/extensions/test/browser/browser_colorwaycloset_aboutaddons.js that can be used as a reference.
We may also wish to mock BuiltInTheme instead of BuiltInThemeConfig (or vice versa) to avoid the need for importing two jsm files. For instance, BuiltInTheme.findActiveColorwayCollection calls BuiltInThemeConfig.findActiveColorwayCollection (searchfox)
Updated•4 years ago
|
browser/browser_colorwayCloset.js uses sinon to stub out certain methods in BuiltInThemes. We should create a head.js file that will contain the general sinon infrastructure previously made and update browser/browser_colorwaycloset_aboutaddons.js to use these doubles.
Updated•4 years ago
|
Updated•4 years ago
|
Comment 4•4 years ago
|
||
| bugherder | ||
Description
•