Closed Bug 1774432 Opened 2 years ago Closed 2 years ago

Implement a reliable mock of BuiltInThemes and BuiltInThemeConfig for tests

Categories

(Firefox :: Theme, task)

task

Tracking

()

RESOLVED FIXED
105 Branch
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)

Whiteboard: fidefe-colorway-closet
Blocks: 1774183

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.

Assignee: nobody → kpatenio
Status: NEW → ASSIGNED
Blocks: 1782695
Attachment #9285399 - Attachment description: WIP: Bug 1774432 - consolidate BuiltInTheme mocks for browser_colorwayCloset.js and browser_colorwaycloset_aboutaddons.js → Bug 1774432 - consolidate BuiltInTheme mocks for browser_colorwayCloset.js and browser_colorwaycloset_aboutaddons.js
Blocks: 1783675
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
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 105 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: