Fix skwasm tests (#145570)
Skwasm tests are now running as `bringup: true` in postsubmit, but failing. Let's get them fixed.
This commit is contained in:
@@ -62,8 +62,8 @@ class MatchesGoldenFile extends AsyncMatcher {
|
||||
final ui.FlutterView view = binding.platformDispatcher.implicitView!;
|
||||
final RenderView renderView = binding.renderViews.firstWhere((RenderView r) => r.flutterView == view);
|
||||
|
||||
if (isCanvasKit) {
|
||||
// In CanvasKit, use Layer.toImage to generate the screenshot.
|
||||
if (isSkiaWeb) {
|
||||
// In CanvasKit and Skwasm, use Layer.toImage to generate the screenshot.
|
||||
final TestWidgetsFlutterBinding binding = TestWidgetsFlutterBinding.instance;
|
||||
return binding.runAsync<String?>(() async {
|
||||
assert(element.renderObject != null);
|
||||
|
||||
@@ -4,12 +4,12 @@
|
||||
|
||||
import 'dart:io';
|
||||
|
||||
/// Whether the test is running in a web browser compiled to JavaScript.
|
||||
/// Whether the test is running in a web browser compiled to JavaScript or WebAssembly.
|
||||
///
|
||||
/// See also:
|
||||
///
|
||||
/// * [kIsWeb], the equivalent constant in the `foundation` library.
|
||||
const bool isBrowser = identical(0, 0.0);
|
||||
const bool isBrowser = bool.fromEnvironment('dart.library.js_interop');
|
||||
|
||||
/// Whether the test is running on the Windows operating system.
|
||||
///
|
||||
|
||||
Reference in New Issue
Block a user