feat: Allow usage of an absolute path for partitions used in a session (#37604)
* Allow an absolute path to be used for creating sessions Allows an absolute path to be used for creating sessions by adding the session.fromPath() API. * Fixup! Clarify that an emptry string is not permitted as a parameter to fromPath()
This commit is contained in:
parent
eb613ef3d4
commit
e0c348a2f8
8 changed files with 153 additions and 18 deletions
|
@ -31,6 +31,14 @@ describe('session module', () => {
|
|||
});
|
||||
});
|
||||
|
||||
describe('session.fromPath(path)', () => {
|
||||
it('returns storage path of a session which was created with an absolute path', () => {
|
||||
const tmppath = require('electron').app.getPath('temp');
|
||||
const ses = session.fromPath(tmppath);
|
||||
expect(ses.storagePath).to.equal(tmppath);
|
||||
});
|
||||
});
|
||||
|
||||
describe('ses.cookies', () => {
|
||||
const name = '0';
|
||||
const value = '0';
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue