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.
|
// iframes w/ snapshots, etc.
|
||||||
if (location && location.protocol === 'data:')
|
if (location && location.protocol === 'data:')
|
||||||
return;
|
return;
|
||||||
|
if (window.top !== window)
|
||||||
|
return;
|
||||||
Object.entries(settings).map(([k, v]) => localStorage[k] = v);
|
Object.entries(settings).map(([k, v]) => localStorage[k] = v);
|
||||||
(window as any).saveSettings = () => {
|
(window as any).saveSettings = () => {
|
||||||
(window as any)._saveSerializedSettings(JSON.stringify({ ...localStorage }));
|
(window as any)._saveSerializedSettings(JSON.stringify({ ...localStorage }));
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue