Skip to content

Commit 1f13108

Browse files
committed
cherry-pick(#35058): chore: hide indexedDB from storageState() and BrowserContext option
1 parent 9e9f0d1 commit 1f13108

File tree

8 files changed

+22
-62
lines changed

8 files changed

+22
-62
lines changed

Diff for: docs/src/api/class-apirequest.md

-1
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,6 @@ Methods like [`method: APIRequestContext.get`] take the base URL into considerat
7171
- `localStorage` <[Array]<[Object]>>
7272
- `name` <[string]>
7373
- `value` <[string]>
74-
- `indexedDB` ?<[Array]<[unknown]>> indexedDB to set for context
7574

7675
Populates context with given storage state. This option can be used to initialize context with logged-in information
7776
obtained via [`method: BrowserContext.storageState`] or [`method: APIRequestContext.storageState`]. Either a path to the

Diff for: docs/src/api/class-apirequestcontext.md

-1
Original file line numberDiff line numberDiff line change
@@ -880,7 +880,6 @@ context cookies from the response. The method will automatically follow redirect
880880
- `localStorage` <[Array]<[Object]>>
881881
- `name` <[string]>
882882
- `value` <[string]>
883-
- `indexedDB` <[Array]<[unknown]>>
884883

885884
Returns storage state for this request context, contains current cookies and local storage snapshot if it was passed to the constructor.
886885

Diff for: docs/src/api/class-browsercontext.md

-1
Original file line numberDiff line numberDiff line change
@@ -1511,7 +1511,6 @@ Whether to emulate network being offline for the browser context.
15111511
- `localStorage` <[Array]<[Object]>>
15121512
- `name` <[string]>
15131513
- `value` <[string]>
1514-
- `indexedDB` <[Array]<[unknown]>>
15151514

15161515
Returns storage state for this browser context, contains current cookies, local storage snapshot and IndexedDB snapshot.
15171516

Diff for: docs/src/api/params.md

-1
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,6 @@ Specify environment variables that will be visible to the browser. Defaults to `
264264
- `localStorage` <[Array]<[Object]>> localStorage to set for context
265265
- `name` <[string]>
266266
- `value` <[string]>
267-
- `indexedDB` ?<[Array]<[unknown]>> indexedDB to set for context
268267

269268
Learn more about [storage state and auth](../auth.md).
270269

Diff for: packages/playwright-client/types/types.d.ts

-19
Original file line numberDiff line numberDiff line change
@@ -9317,8 +9317,6 @@ export interface BrowserContext {
93179317

93189318
value: string;
93199319
}>;
9320-
9321-
indexedDB: Array<unknown>;
93229320
}>;
93239321
}>;
93249322

@@ -10085,11 +10083,6 @@ export interface Browser {
1008510083

1008610084
value: string;
1008710085
}>;
10088-
10089-
/**
10090-
* indexedDB to set for context
10091-
*/
10092-
indexedDB?: Array<unknown>;
1009310086
}>;
1009410087
};
1009510088

@@ -17638,11 +17631,6 @@ export interface APIRequest {
1763817631

1763917632
value: string;
1764017633
}>;
17641-
17642-
/**
17643-
* indexedDB to set for context
17644-
*/
17645-
indexedDB?: Array<unknown>;
1764617634
}>;
1764717635
};
1764817636

@@ -18457,8 +18445,6 @@ export interface APIRequestContext {
1845718445

1845818446
value: string;
1845918447
}>;
18460-
18461-
indexedDB: Array<unknown>;
1846218448
}>;
1846318449
}>;
1846418450

@@ -22306,11 +22292,6 @@ export interface BrowserContextOptions {
2230622292

2230722293
value: string;
2230822294
}>;
22309-
22310-
/**
22311-
* indexedDB to set for context
22312-
*/
22313-
indexedDB?: Array<unknown>;
2231422295
}>;
2231522296
};
2231622297

Diff for: packages/playwright-core/src/client/types.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ export type SelectOptionOptions = { force?: boolean, timeout?: number };
3737
export type FilePayload = { name: string, mimeType: string, buffer: Buffer };
3838
export type StorageState = {
3939
cookies: channels.NetworkCookie[],
40-
origins: (Omit<channels.OriginStorage, 'indexedDB'> & { indexedDB: unknown[] })[],
40+
origins: (Omit<channels.OriginStorage, 'indexedDB'>)[],
4141
};
4242
export type SetStorageState = {
4343
cookies?: channels.SetNetworkCookie[],

Diff for: packages/playwright-core/types/types.d.ts

-19
Original file line numberDiff line numberDiff line change
@@ -9317,8 +9317,6 @@ export interface BrowserContext {
93179317

93189318
value: string;
93199319
}>;
9320-
9321-
indexedDB: Array<unknown>;
93229320
}>;
93239321
}>;
93249322

@@ -10085,11 +10083,6 @@ export interface Browser {
1008510083

1008610084
value: string;
1008710085
}>;
10088-
10089-
/**
10090-
* indexedDB to set for context
10091-
*/
10092-
indexedDB?: Array<unknown>;
1009310086
}>;
1009410087
};
1009510088

@@ -17638,11 +17631,6 @@ export interface APIRequest {
1763817631

1763917632
value: string;
1764017633
}>;
17641-
17642-
/**
17643-
* indexedDB to set for context
17644-
*/
17645-
indexedDB?: Array<unknown>;
1764617634
}>;
1764717635
};
1764817636

@@ -18457,8 +18445,6 @@ export interface APIRequestContext {
1845718445

1845818446
value: string;
1845918447
}>;
18460-
18461-
indexedDB: Array<unknown>;
1846218448
}>;
1846318449
}>;
1846418450

@@ -22306,11 +22292,6 @@ export interface BrowserContextOptions {
2230622292

2230722293
value: string;
2230822294
}>;
22309-
22310-
/**
22311-
* indexedDB to set for context
22312-
*/
22313-
indexedDB?: Array<unknown>;
2231422295
}>;
2231522296
};
2231622297

Diff for: tests/library/global-fetch-cookie.spec.ts

+21-19
Original file line numberDiff line numberDiff line change
@@ -352,25 +352,27 @@ it('should preserve local storage on import/export of storage state', async ({ p
352352
name: 'name1',
353353
value: 'value1'
354354
}],
355-
indexedDB: [
356-
{
357-
name: 'db',
358-
version: 5,
359-
stores: [
360-
{
361-
name: 'store',
362-
keyPath: 'id',
363-
autoIncrement: false,
364-
indexes: [],
365-
records: [
366-
{
367-
value: { id: 'foo', name: 'John Doe' }
368-
}
369-
],
370-
}
371-
]
372-
}
373-
],
355+
...{
356+
indexedDB: [
357+
{
358+
name: 'db',
359+
version: 5,
360+
stores: [
361+
{
362+
name: 'store',
363+
keyPath: 'id',
364+
autoIncrement: false,
365+
indexes: [],
366+
records: [
367+
{
368+
value: { id: 'foo', name: 'John Doe' }
369+
}
370+
],
371+
}
372+
]
373+
}
374+
]
375+
},
374376
},
375377
]
376378
};

0 commit comments

Comments
 (0)