feat: add commandLine.removeSwitch (#30933)
* feat: add commandLine.removeSwitch In some cases apps may want to remove Chromium command line switches to avoid certain Chromium behaviors being used, E.g. remote-debugging-port or gpu-launcher * fix: add missing removeSwitch to app.ts Co-authored-by: Milan Burda <milan.burda@gmail.com>
This commit is contained in:
parent
d6de243837
commit
014ebbd6fa
4 changed files with 32 additions and 1 deletions
|
@ -1603,6 +1603,21 @@ describe('app module', () => {
|
|||
});
|
||||
});
|
||||
|
||||
describe('commandLine.removeSwitch', () => {
|
||||
it('no-ops a non-existent switch', async () => {
|
||||
expect(app.commandLine.hasSwitch('foobar3')).to.equal(false);
|
||||
app.commandLine.removeSwitch('foobar3');
|
||||
expect(app.commandLine.hasSwitch('foobar3')).to.equal(false);
|
||||
});
|
||||
|
||||
it('removes an existing switch', async () => {
|
||||
app.commandLine.appendSwitch('foobar3', 'test');
|
||||
expect(app.commandLine.hasSwitch('foobar3')).to.equal(true);
|
||||
app.commandLine.removeSwitch('foobar3');
|
||||
expect(app.commandLine.hasSwitch('foobar3')).to.equal(false);
|
||||
});
|
||||
});
|
||||
|
||||
ifdescribe(process.platform === 'darwin')('app.setSecureKeyboardEntryEnabled', () => {
|
||||
it('changes Secure Keyboard Entry is enabled', () => {
|
||||
app.setSecureKeyboardEntryEnabled(true);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue