From 95aad999c9d90f0b2b6882ade944a3eb0e499602 Mon Sep 17 00:00:00 2001 From: Sam Rawlins Date: Wed, 4 Nov 2026 07:42:39 -0800 Subject: [PATCH] Use "headless" flag in web tests for LUCI --- .../test_infra/run/_test_app_driver.dart | 9 ++++++++- .../integration_test/test_infra/run/run_test.dart | 1 + 2 files changed, 9 insertions(+), 1 deletion(-) 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');