diff --git a/packages/devtools_app/integration_test/test_infra/run/_test_app_driver.dart b/packages/devtools_app/integration_test/test_infra/run/_test_app_driver.dart index 4906faef256..95e2582dbf3 100644 --- a/packages/devtools_app/integration_test/test_infra/run/_test_app_driver.dart +++ b/packages/devtools_app/integration_test/test_infra/run/_test_app_driver.dart @@ -15,7 +15,12 @@ class TestFlutterApp extends IntegrationTestApp { TestFlutterApp({ String appPath = 'test/test_infra/fixtures/flutter_app', TestAppDevice appDevice = TestAppDevice.flutterTester, - }) : super(appPath, appDevice); + bool headless = false, + }) : _headless = headless, + super(appPath, appDevice); + + /// Whether to run web tests headlessly. + final bool _headless; String? _currentRunningAppId; @@ -30,6 +35,8 @@ class TestFlutterApp extends IntegrationTestApp { testAppDevice.argName, // Do not serve DevTools from Flutter Tools. '--no-devtools', + if (_headless && testAppDevice == TestAppDevice.flutterChrome) + '--web-run-headless', ], workingDirectory: testAppPath, ); diff --git a/packages/devtools_app/integration_test/test_infra/run/run_test.dart b/packages/devtools_app/integration_test/test_infra/run/run_test.dart index e815316a7e6..39c2c2ccef3 100644 --- a/packages/devtools_app/integration_test/test_infra/run/run_test.dart +++ b/packages/devtools_app/integration_test/test_infra/run/run_test.dart @@ -58,6 +58,7 @@ Future runFlutterIntegrationTest( testApp = TestFlutterApp( appPath: testFileArgs.appPath, appDevice: testRunnerArgs.testAppDevice, + headless: testRunnerArgs.headless, ); } debugLog('starting the test app');