mirror of
https://github.com/electron/electron.git
synced 2026-01-08 23:18:06 -05:00
feat: enable resetting accent color (#48274)
This commit is contained in:
@@ -2562,7 +2562,23 @@ describe('BrowserWindow module', () => {
|
||||
expect(() => {
|
||||
// @ts-ignore this is wrong on purpose.
|
||||
w.setAccentColor([1, 2, 3]);
|
||||
}).to.throw('Invalid accent color value - must be a string or boolean');
|
||||
}).to.throw('Invalid accent color value - must be null, hex string, or boolean');
|
||||
});
|
||||
|
||||
it('throws if called with an invalid parameter', () => {
|
||||
const w = new BrowserWindow({ show: false });
|
||||
expect(() => {
|
||||
// @ts-ignore this is wrong on purpose.
|
||||
w.setAccentColor(new Date());
|
||||
}).to.throw('Invalid accent color value - must be null, hex string, or boolean');
|
||||
});
|
||||
|
||||
it('can be reset with null', () => {
|
||||
const w = new BrowserWindow({ show: false });
|
||||
w.setAccentColor('#FF0000');
|
||||
expect(w.getAccentColor()).to.equal('#FF0000');
|
||||
w.setAccentColor(null);
|
||||
expect(w.getAccentColor()).to.not.equal('#FF0000');
|
||||
});
|
||||
|
||||
it('returns the accent color after setting it to a string', () => {
|
||||
|
||||
Reference in New Issue
Block a user