mirror of
https://github.com/finos/SymphonyElectron.git
synced 2025-02-25 18:55:29 -06:00
SDA-4199 Add UT
This commit is contained in:
parent
6e89cc39a2
commit
a6fc4986fe
@ -75,6 +75,12 @@ describe('chrome flags', () => {
|
||||
expect(spy).nthCalledWith(4, 'disable-d3d11', true);
|
||||
expect(spy).nthCalledWith(5, 'disable-gpu', true);
|
||||
expect(spy).nthCalledWith(6, 'disable-gpu-compositing', true);
|
||||
expect(spy).nthCalledWith(
|
||||
7,
|
||||
'enable-blink-features',
|
||||
'RTCInsertableStreams',
|
||||
);
|
||||
expect(spy).nthCalledWith(8, 'disable-features', 'ChromeRootStoreUsed');
|
||||
});
|
||||
|
||||
it('should call `setChromeFlags` correctly when `disableGpu` is false', () => {
|
||||
@ -111,8 +117,8 @@ describe('chrome flags', () => {
|
||||
});
|
||||
const spy = jest.spyOn(app.commandLine, 'appendSwitch');
|
||||
setChromeFlags();
|
||||
expect(spy).nthCalledWith(6, 'disable-renderer-backgrounding', 'true');
|
||||
expect(spy).not.nthCalledWith(7);
|
||||
expect(spy).nthCalledWith(7, 'disable-renderer-backgrounding', 'true');
|
||||
expect(spy).not.nthCalledWith(8);
|
||||
});
|
||||
|
||||
it('should set `disable-renderer-backgrounding` chrome flag correctly when cloud config PMP setting is ENABLED', () => {
|
||||
@ -123,8 +129,8 @@ describe('chrome flags', () => {
|
||||
});
|
||||
const spy = jest.spyOn(app.commandLine, 'appendSwitch');
|
||||
setChromeFlags();
|
||||
expect(spy).nthCalledWith(8, 'disable-renderer-backgrounding', 'true');
|
||||
expect(spy).not.nthCalledWith(9);
|
||||
expect(spy).nthCalledWith(9, 'disable-renderer-backgrounding', 'true');
|
||||
expect(spy).not.nthCalledWith(10);
|
||||
});
|
||||
|
||||
it('should set `disable-renderer-backgrounding` chrome flag when any one is ENABLED ', () => {
|
||||
@ -145,8 +151,8 @@ describe('chrome flags', () => {
|
||||
});
|
||||
const spy = jest.spyOn(app.commandLine, 'appendSwitch');
|
||||
setChromeFlags();
|
||||
expect(spy).nthCalledWith(6, 'disable-renderer-backgrounding', 'true');
|
||||
expect(spy).not.nthCalledWith(7);
|
||||
expect(spy).nthCalledWith(7, 'disable-renderer-backgrounding', 'true');
|
||||
expect(spy).not.nthCalledWith(8);
|
||||
});
|
||||
|
||||
it('should set `disable-renderer-backgrounding` chrome flag when PMP is ENABLED', () => {
|
||||
@ -167,8 +173,8 @@ describe('chrome flags', () => {
|
||||
});
|
||||
const spy = jest.spyOn(app.commandLine, 'appendSwitch');
|
||||
setChromeFlags();
|
||||
expect(spy).nthCalledWith(6, 'disable-renderer-backgrounding', 'true');
|
||||
expect(spy).not.nthCalledWith(7);
|
||||
expect(spy).nthCalledWith(7, 'disable-renderer-backgrounding', 'true');
|
||||
expect(spy).not.nthCalledWith(8);
|
||||
});
|
||||
|
||||
describe('`isDevEnv`', () => {
|
||||
|
Loading…
Reference in New Issue
Block a user