Skip to content

Commit e269092

Browse files
authored
Revert "fix: add 'window-management' to chromium browser (#31687)" (#31801)
This reverts commit 0aa2f06. Discussed the new permission in the API review and decided not to proceed with the feature as we are not ready to commit to supporting it yet: * the API is Chromium specific * the API is still experimental * there is no clarity to what extend the screen manipulation APIs will work in old headless which is our main test environment We'll keep an eye on the demand for the feature and may get back to implementing it in the future. Reference: #27198
1 parent bef8784 commit e269092

File tree

4 files changed

+0
-11
lines changed

4 files changed

+0
-11
lines changed

docs/src/api/class-browsercontext.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -980,7 +980,6 @@ A permission or an array of permissions to grant. Permissions can be one of the
980980
* `'notifications'`
981981
* `'payment-handler'`
982982
* `'storage-access'`
983-
* `'window-management'`
984983

985984
### option: BrowserContext.grantPermissions.origin
986985
* since: v1.8

packages/playwright-core/src/server/chromium/crBrowser.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -434,7 +434,6 @@ export class CRBrowserContext extends BrowserContext {
434434
// chrome-specific permissions we have.
435435
['midi-sysex', 'midiSysex'],
436436
['storage-access', 'storageAccess'],
437-
['window-management', 'windowManagement']
438437
]);
439438
const filtered = permissions.map(permission => {
440439
const protocolPermission = webPermissionToProtocol.get(permission);

packages/playwright-core/types/types.d.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8445,7 +8445,6 @@ export interface BrowserContext {
84458445
* - `'notifications'`
84468446
* - `'payment-handler'`
84478447
* - `'storage-access'`
8448-
* - `'window-management'`
84498448
* @param options
84508449
*/
84518450
grantPermissions(permissions: ReadonlyArray<string>, options?: {

tests/library/permissions.spec.ts

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -48,14 +48,6 @@ it.describe('permissions', () => {
4848
expect(await getPermission(page, 'geolocation')).toBe('granted');
4949
});
5050

51-
it('should grant window-management permission when origin is listed', async ({ page, context, server, browserName }) => {
52-
it.skip(browserName !== 'chromium', 'Only Chromium supports window management API.');
53-
54-
await page.goto(server.EMPTY_PAGE);
55-
await context.grantPermissions(['window-management'], { origin: server.EMPTY_PAGE });
56-
expect(await getPermission(page, 'window-management')).toBe('granted');
57-
});
58-
5951
it('should prompt for geolocation permission when origin is not listed', async ({ page, context, server }) => {
6052
await page.goto(server.EMPTY_PAGE);
6153
await context.grantPermissions(['geolocation'], { origin: server.EMPTY_PAGE });

0 commit comments

Comments
 (0)