Merge pull request #1040 from johankwarnmarksymphony/e2e_encryption_flag

fix: Enable E2E encryption api in webRTC
This commit is contained in:
Johan Kwarnmark 2020-07-29 11:04:34 +02:00 committed by GitHub
commit 69b97c7f70
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 8 deletions

View File

@ -98,8 +98,8 @@ describe('chrome flags', () => {
});
const spy = jest.spyOn(app.commandLine, 'appendSwitch');
setChromeFlags();
expect(spy).nthCalledWith(4, 'disable-renderer-backgrounding', 'true');
expect(spy).not.nthCalledWith(5);
expect(spy).nthCalledWith(5, 'disable-renderer-backgrounding', 'true');
expect(spy).not.nthCalledWith(6);
});
it('should set `disable-renderer-backgrounding` chrome flag correctly when cloud config PMP setting is ENABLED', () => {
@ -110,8 +110,8 @@ describe('chrome flags', () => {
});
const spy = jest.spyOn(app.commandLine, 'appendSwitch');
setChromeFlags();
expect(spy).nthCalledWith(7, 'disable-renderer-backgrounding', 'true');
expect(spy).not.nthCalledWith(8);
expect(spy).nthCalledWith(8, 'disable-renderer-backgrounding', 'true');
expect(spy).not.nthCalledWith(9);
});
it('should set `disable-renderer-backgrounding` chrome flag when any one is ENABLED ', () => {
@ -132,8 +132,8 @@ describe('chrome flags', () => {
});
const spy = jest.spyOn(app.commandLine, 'appendSwitch');
setChromeFlags();
expect(spy).nthCalledWith(4, 'disable-renderer-backgrounding', 'true');
expect(spy).not.nthCalledWith(5);
expect(spy).nthCalledWith(5, 'disable-renderer-backgrounding', 'true');
expect(spy).not.nthCalledWith(6);
});
it('should set `disable-renderer-backgrounding` chrome flag when PMP is ENABLED', () => {
@ -154,8 +154,8 @@ describe('chrome flags', () => {
});
const spy = jest.spyOn(app.commandLine, 'appendSwitch');
setChromeFlags();
expect(spy).nthCalledWith(4, 'disable-renderer-backgrounding', 'true');
expect(spy).not.nthCalledWith(5);
expect(spy).nthCalledWith(5, 'disable-renderer-backgrounding', 'true');
expect(spy).not.nthCalledWith(6);
});
describe('`isDevEnv`', () => {

View File

@ -25,6 +25,7 @@ export const setChromeFlags = () => {
'disable-d3d11': flagsConfig.disableGpu || null,
'disable-gpu': flagsConfig.disableGpu || null,
'disable-gpu-compositing': flagsConfig.disableGpu || null,
'enable-experimental-web-platform-features': 'true',
};
if (flagsConfig.customFlags.disableThrottling === CloudConfigDataTypes.ENABLED || disableThrottling === CloudConfigDataTypes.ENABLED) {
configFlags['disable-renderer-backgrounding'] = 'true';