docs: fix some string union type (#39258)
* docs: fix some string union types Improve Type Union Typings in the Docs * test: add smoke tests * test: update `ses.clearStorageData` test case * test: update `ses.clearStorageData` test case --------- Co-authored-by: mhli <mhli@hillinsight.com>
This commit is contained in:
parent
6df392162f
commit
2b283724ce
7 changed files with 30 additions and 11 deletions
|
@ -252,12 +252,11 @@ describe('session module', () => {
|
|||
it('clears localstorage data', async () => {
|
||||
const w = new BrowserWindow({ show: false, webPreferences: { nodeIntegration: true } });
|
||||
await w.loadFile(path.join(fixtures, 'api', 'localstorage.html'));
|
||||
const options = {
|
||||
await w.webContents.session.clearStorageData({
|
||||
origin: 'file://',
|
||||
storages: ['localstorage'],
|
||||
quotas: ['persistent']
|
||||
};
|
||||
await w.webContents.session.clearStorageData(options);
|
||||
quotas: ['temporary']
|
||||
});
|
||||
while (await w.webContents.executeJavaScript('localStorage.length') !== 0) {
|
||||
// The storage clear isn't instantly visible to the renderer, so keep
|
||||
// trying until it is.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue