Dual compile reland (#143262)

This is an attempt at a reland of https://github.com/flutter/flutter/pull/141396

The main changes here that are different than the original PR is fixes to wire up the `flutter test` command properly with the web renderer.
This commit is contained in:
Jackson Gardner
2024-02-13 12:02:10 -08:00
committed by GitHub
parent 4f1fc5a883
commit 5a9fa1e7bf
36 changed files with 992 additions and 468 deletions

View File

@@ -6,8 +6,12 @@ found in the LICENSE file. -->
<head>
<meta charset="UTF-8">
<title>Web Benchmarks</title>
<script src="flutter.js"></script>
</head>
<body>
<script src="main.dart.js" type="application/javascript"></script>
<script>
{{flutter_build_config}}
_flutter.loader.load();
</script>
</body>
</html>

View File

@@ -39,7 +39,7 @@ Future<TaskResult> runWebBenchmark(WebBenchmarkOptions benchmarkOptions) async {
'--omit-type-checks',
],
'--dart-define=FLUTTER_WEB_ENABLE_PROFILING=true',
'--web-renderer=${benchmarkOptions.webRenderer}',
if (!benchmarkOptions.useWasm) '--web-renderer=${benchmarkOptions.webRenderer}',
'--profile',
'--no-web-resources-cdn',
'-t',
@@ -125,7 +125,7 @@ Future<TaskResult> runWebBenchmark(WebBenchmarkOptions benchmarkOptions) async {
return Response.internalServerError(body: '$error');
}
}).add(createBuildDirectoryHandler(
path.join(macrobenchmarksDirectory, 'build', benchmarkOptions.useWasm ? 'web_wasm' : 'web'),
path.join(macrobenchmarksDirectory, 'build', 'web'),
));
server = await io.HttpServer.bind('localhost', benchmarkServerPort);

View File

@@ -5,14 +5,17 @@ found in the LICENSE file. -->
<html>
<head>
<title>Web Integration Tests</title>
<script>
// Use the local CanvasKit bundle instead of the CDN to reduce test flakiness.
window.flutterConfiguration = {
canvasKitBaseUrl: "/canvaskit/"
};
</script>
<script src="flutter.js"></script>
</head>
<body>
<script src="main.dart.js"></script>
<script>
{{flutter_build_config}}
_flutter.loader.load({
config: {
// Use the local CanvasKit bundle instead of the CDN to reduce test flakiness.
canvasKitBaseUrl: "/canvaskit/",
},
});
</script>
</body>
</html>