Support flutter run --wasm and flutter drive --wasm. (#146231)
This adds support for adding the `--wasm` flag to `flutter run` and `flutter drive` * Emits errors if you attempt to use the skwasm renderer without the `--wasm` flag * Emits errors if you try to use `--wasm` when not using a web device * Uses the skwasm renderer by default if you pass `--wasm` and no `--web-renderer`
This commit is contained in:
@@ -12,5 +12,7 @@ void main() {
|
||||
testWidgets('isCanvasKit returns true in CanvasKit mode', (WidgetTester tester) async {
|
||||
await tester.pumpAndSettle();
|
||||
expect(isCanvasKit, true);
|
||||
expect(isSkwasm, false);
|
||||
expect(isSkiaWeb, true);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -8,8 +8,10 @@ import 'package:integration_test/integration_test.dart';
|
||||
void main() {
|
||||
IntegrationTestWidgetsFlutterBinding.ensureInitialized();
|
||||
|
||||
testWidgets('isCanvasKit returns false in HTML mode', (WidgetTester tester) async {
|
||||
testWidgets('capabilities are set properly in HTML mode', (WidgetTester tester) async {
|
||||
await tester.pumpAndSettle();
|
||||
expect(isCanvasKit, false);
|
||||
expect(isSkwasm, false);
|
||||
expect(isSkiaWeb, false);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
// Copyright 2014 The Flutter Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:flutter_test/flutter_test.dart';
|
||||
import 'package:integration_test/integration_test.dart';
|
||||
|
||||
void main() {
|
||||
IntegrationTestWidgetsFlutterBinding.ensureInitialized();
|
||||
|
||||
testWidgets('capabilities are set properly in Skwasm mode', (WidgetTester tester) async {
|
||||
await tester.pumpAndSettle();
|
||||
expect(isCanvasKit, false);
|
||||
expect(isSkwasm, true);
|
||||
expect(isSkiaWeb, true);
|
||||
});
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
// Copyright 2014 The Flutter Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
import 'package:integration_test/integration_test_driver.dart' as test;
|
||||
|
||||
Future<void> main() async => test.integrationDriver();
|
||||
Reference in New Issue
Block a user