diff --git a/packages/e2e-tests/plugins/enable-client-side-media-processing.php b/packages/e2e-tests/plugins/enable-client-side-media-processing.php new file mode 100644 index 00000000000000..32105dbdbaa4c2 --- /dev/null +++ b/packages/e2e-tests/plugins/enable-client-side-media-processing.php @@ -0,0 +1,10 @@ + { + test.beforeAll( async ( { requestUtils } ) => { + // Client-side media processing (and cross-origin isolation) is + // temporarily disabled in the Gutenberg plugin. + // See https://github.com/WordPress/gutenberg/pull/75756 + await requestUtils.activatePlugin( + 'gutenberg-test-plugin-enable-client-side-media-processing' + ); + } ); + + test.afterAll( async ( { requestUtils } ) => { + await requestUtils.deactivatePlugin( + 'gutenberg-test-plugin-enable-client-side-media-processing' + ); + } ); + test.beforeEach( async ( { admin } ) => { await admin.createNewPost(); } ); - test( 'should be cross-origin isolated by default', async ( { page } ) => { - // Verify that cross-origin isolation IS enabled (default state - // now that client-side media processing is graduated). + test( 'should be cross-origin isolated when client-side media processing is enabled', async ( { + page, + } ) => { + // Verify that cross-origin isolation IS enabled when + // client-side media processing is active. const isCrossOriginIsolated = await page.evaluate( () => window.crossOriginIsolated );