@@ -27,6 +27,7 @@ class IntegrationTestRunner with IOMixin {
2727 String testTarget, {
2828 required String testDriver,
2929 bool headless = false ,
30+ bool useWasm = false ,
3031 List <String > dartDefineArgs = const < String > [],
3132 bool debugLogging = false ,
3233 }) async {
@@ -51,7 +52,10 @@ class IntegrationTestRunner with IOMixin {
5152 headless ? 'web-server' : 'chrome' ,
5253 // --disable-gpu speeds up tests that use ChromeDriver when run on
5354 // GitHub Actions. See https://github.com/flutter/devtools/issues/8301.
54- '--web-browser-flag=--disable-gpu' ,
55+ // However, it also breaks the tests when running with the wasm flag,
56+ // because it prevents capturing browser logs. See:
57+ // https://github.com/flutter/devtools/issues/9727
58+ useWasm ? '--wasm' : '--web-browser-flag=--disable-gpu' ,
5559 if (headless) ...[
5660 // Flags to avoid breakage with chromedriver 138. See
5761 // https://github.com/flutter/devtools/issues/9357.
@@ -223,6 +227,9 @@ class IntegrationTestRunnerArgs {
223227 /// instead of 'chrome'.
224228 bool get headless => argResults.flag (_headlessArg);
225229
230+ /// Whether this integration test should be run against dart2wasm-compiled DevTools.
231+ bool get useWasm => argResults.flag (_wasmArg);
232+
226233 /// Sharding information for this test run.
227234 ({int shardNumber, int totalShards})? get shard {
228235 final shardValue = argResults.option (_shardArg);
@@ -250,6 +257,7 @@ class IntegrationTestRunnerArgs {
250257 static const _helpArg = 'help' ;
251258 static const testTargetArg = 'target' ;
252259 static const _headlessArg = 'headless' ;
260+ static const _wasmArg = 'wasm' ;
253261 static const _shardArg = 'shard' ;
254262
255263 /// Builds an arg parser for DevTools integration tests.
@@ -277,6 +285,11 @@ class IntegrationTestRunnerArgs {
277285 'the \' chrome\' device. For headless test runs, you will not be '
278286 'able to see the integration test run visually in a Chrome browser.' ,
279287 )
288+ ..addFlag (
289+ _wasmArg,
290+ negatable: false ,
291+ help: 'Runs the integration test against dart2wasm-compiled DevTools.' ,
292+ )
280293 ..addOption (
281294 _shardArg,
282295 valueHelp: '1/3' ,
0 commit comments