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•2 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•2 years ago
|
Updated•2 years ago
|
Pushed by kpatenio@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/493bd0be18e2 consolidate BuiltInTheme mocks for browser_colorwayCloset.js and browser_colorwaycloset_aboutaddons.js r=bigiri,dao,rpl
Comment 4•2 years ago
|
||
bugherder |
Description
•