mirror of
https://github.com/garrytan/gstack.git
synced 2026-11-01 06:24:41 +01:00
E8: keep the extensions profile under the state dir at a path lock cleanup accepts
cleanSingletonLocks only cleans directories named chromium-profile, so the BROWSE_EXTENSIONS_DIR profile moves to <state>/extensions/chromium-profile.
This commit is contained in:
1 parent
5f38b93fdf
commit
3f712a4e60
2 files changed
+2
-2
No files matched your search
@@ -583,7 +583,7 @@ export class BrowserManager {
|
||||
}
|
||||
|
||||
if (extensionsDir) {
|
||||
const profileDir = require('path').join(resolveConfig().stateDir, 'chromium-extensions-profile');
|
||||
const profileDir = require('path').join(resolveConfig().stateDir, 'extensions', 'chromium-profile');
|
||||
require('fs').mkdirSync(profileDir, { recursive: true, mode: 0o700 });
|
||||
cleanSingletonLocks(profileDir);
|
||||
this.context = await launchWithXProtectHeal(() => chromium.launchPersistentContext(profileDir, {
|
||||
|
||||
@@ -71,7 +71,7 @@ describe.skipIf(process.platform !== 'linux')('headless launch options (Linux, r
|
||||
const session = bm.getActiveSession();
|
||||
await handleWriteCommand('goto', [`http://127.0.0.1:${server.port}/`], session, bm);
|
||||
expect(await session.getPage().evaluate(() => document.documentElement.getAttribute('data-probe-ext'))).toBe('1');
|
||||
expect(fs.existsSync(path.join(scratch, 'state', 'chromium-extensions-profile'))).toBe(true);
|
||||
expect(fs.existsSync(path.join(scratch, 'state', 'extensions', 'chromium-profile'))).toBe(true);
|
||||
} finally {
|
||||
server.stop(true);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user