mirror of
				https://github.com/microsoft/playwright.git
				synced 2025-06-26 21:40:17 +00:00 
			
		
		
		
	chore: try the new CDPScreenshotNewSurface feature on cr-tot (#36092)
This commit is contained in:
		
							parent
							
								
									4cb2431c33
								
							
						
					
					
						commit
						14dfb291ee
					
				@ -295,7 +295,7 @@ export class Chromium extends BrowserType {
 | 
			
		||||
      throw new Error('Playwright manages remote debugging connection itself.');
 | 
			
		||||
    if (args.find(arg => !arg.startsWith('-')))
 | 
			
		||||
      throw new Error('Arguments can not specify page to be opened');
 | 
			
		||||
    const chromeArguments = [...chromiumSwitches(options.assistantMode)];
 | 
			
		||||
    const chromeArguments = [...chromiumSwitches(options.assistantMode, options.channel)];
 | 
			
		||||
 | 
			
		||||
    if (os.platform() === 'darwin') {
 | 
			
		||||
      // See https://github.com/microsoft/playwright/issues/7362
 | 
			
		||||
 | 
			
		||||
@ -50,7 +50,7 @@ const disabledFeatures = (assistantMode?: boolean) => [
 | 
			
		||||
  assistantMode ? 'AutomationControlled' : '',
 | 
			
		||||
].filter(Boolean);
 | 
			
		||||
 | 
			
		||||
export const chromiumSwitches = (assistantMode?: boolean) => [
 | 
			
		||||
export const chromiumSwitches = (assistantMode?: boolean, channel?: string) => [
 | 
			
		||||
  '--disable-field-trial-config', // https://source.chromium.org/chromium/chromium/src/+/main:testing/variations/README.md
 | 
			
		||||
  '--disable-background-networking',
 | 
			
		||||
  '--disable-background-timer-throttling',
 | 
			
		||||
@ -65,6 +65,7 @@ export const chromiumSwitches = (assistantMode?: boolean) => [
 | 
			
		||||
  '--disable-dev-shm-usage',
 | 
			
		||||
  '--disable-extensions',
 | 
			
		||||
  '--disable-features=' + disabledFeatures(assistantMode).join(','),
 | 
			
		||||
  channel === 'chromium-tip-of-tree' ? '--enable-features=CDPScreenshotNewSurface' : '',
 | 
			
		||||
  '--allow-pre-commit-input',
 | 
			
		||||
  '--disable-hang-monitor',
 | 
			
		||||
  '--disable-ipc-flooding-protection',
 | 
			
		||||
 | 
			
		||||
@ -101,11 +101,11 @@ it('should change document.activeElement', async ({ page, server }) => {
 | 
			
		||||
  expect(active).toEqual(['INPUT', 'TEXTAREA']);
 | 
			
		||||
});
 | 
			
		||||
 | 
			
		||||
it('should not affect screenshots', async ({ page, server, browserName, headless, isWindows, isLinux, isHeadlessShell }) => {
 | 
			
		||||
it('should not affect screenshots', async ({ page, server, browserName, headless, isWindows, isLinux, isHeadlessShell, channel }) => {
 | 
			
		||||
  it.skip(browserName === 'webkit' && isWindows && !headless, 'WebKit/Windows/headed has a larger minimal viewport. See https://github.com/microsoft/playwright/issues/22616');
 | 
			
		||||
  it.skip(browserName === 'webkit' && isLinux && !headless, 'WebKit headed has a larger minimal viewport on gtk4.');
 | 
			
		||||
  it.skip(browserName === 'firefox' && !headless, 'Firefox headed produces a different image');
 | 
			
		||||
  it.fixme(browserName === 'chromium' && !isHeadlessShell, 'https://github.com/microsoft/playwright/issues/33330');
 | 
			
		||||
  it.fixme(browserName === 'chromium' && !isHeadlessShell && channel !== 'chromium-tip-of-tree', 'https://github.com/microsoft/playwright/issues/33330');
 | 
			
		||||
 | 
			
		||||
  const page2 = await page.context().newPage();
 | 
			
		||||
  await Promise.all([
 | 
			
		||||
 | 
			
		||||
@ -22,8 +22,8 @@ import { verifyViewport } from '../config/utils';
 | 
			
		||||
browserTest.describe('page screenshot', () => {
 | 
			
		||||
  browserTest.skip(({ browserName, headless }) => browserName === 'firefox' && !headless, 'Firefox headed produces a different image.');
 | 
			
		||||
 | 
			
		||||
  browserTest('should run in parallel in multiple pages', async ({ server, contextFactory, browserName, isHeadlessShell }) => {
 | 
			
		||||
    browserTest.fixme(browserName === 'chromium' && !isHeadlessShell, 'https://github.com/microsoft/playwright/issues/33330');
 | 
			
		||||
  browserTest('should run in parallel in multiple pages', async ({ server, contextFactory, browserName, isHeadlessShell, channel }) => {
 | 
			
		||||
    browserTest.fixme(browserName === 'chromium' && !isHeadlessShell && channel !== 'chromium-tip-of-tree', 'https://github.com/microsoft/playwright/issues/33330');
 | 
			
		||||
 | 
			
		||||
    const context = await contextFactory();
 | 
			
		||||
    const N = 5;
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user