mirror of
https://github.com/microsoft/playwright.git
synced 2024-11-30 23:45:33 +03:00
Cherry-picks https://github.com/microsoft/playwright/pull/31958 into the release.
This commit is contained in:
parent
876e0e4ba9
commit
b20e154902
@ -90,6 +90,8 @@ export async function syncLocalStorageWithSettings(page: Page, appName: string)
|
||||
// iframes w/ snapshots, etc.
|
||||
if (location && location.protocol === 'data:')
|
||||
return;
|
||||
if (window.top !== window)
|
||||
return;
|
||||
Object.entries(settings).map(([k, v]) => localStorage[k] = v);
|
||||
(window as any).saveSettings = () => {
|
||||
(window as any)._saveSerializedSettings(JSON.stringify({ ...localStorage }));
|
||||
|
Loading…
Reference in New Issue
Block a user