[web] Test harness fixes. (flutter/engine#37560)

This commit is contained in:
joshualitt
2022-11-15 12:21:31 -08:00
committed by GitHub
parent 8b8ddc8c04
commit c6467e322e
4 changed files with 11 additions and 5 deletions

View File

@@ -82,10 +82,8 @@ class Chrome extends Browser {
final String dir = environment.webUiDartToolDir.createTempSync('test_chrome_user_data_').resolveSymbolicLinksSync();
final String jsFlags = enableWasmGC ? <String>[
'--experimental-wasm-gc',
'--wasm-gc-js-interop',
'--experimental-wasm-stack-switching',
'--experimental-wasm-type-reflection',
'--wasm-gc-js-interop',
].join(' ') : '';
final List<String> args = <String>[
if (jsFlags.isNotEmpty) '--js-flags=$jsFlags',

View File

@@ -26,7 +26,7 @@ dev_dependencies:
shelf_static: any
shelf_web_socket: any
stack_trace: any
stream_channel: any
stream_channel: 2.1.1
test: 1.22.0
test_api: any
test_core: any

View File

@@ -18,7 +18,10 @@ import 'package:ui/src/engine/dom.dart';
/// A class defined in content shell, used to control its behavior.
@JS()
class _TestRunner {
@staticInterop
class _TestRunner {}
extension _TestRunnerExtension on _TestRunner {
external void waitUntilDone();
}
@@ -32,15 +35,20 @@ external _TestRunner? get testRunner; // ignore: library_private_types_in_public
/// debugging.
@JS()
@anonymous
@staticInterop
class _JSApi {
external factory _JSApi({void Function() resume, void Function() restartCurrent});
}
extension _JSApiExtension on _JSApi {
/// Causes the test runner to resume running, as though the user had clicked
/// the "play" button.
// ignore: unused_element
external Function get resume;
/// Causes the test runner to restart the current test once it finishes
/// running.
// ignore: unused_element
external Function get restartCurrent;
}

View File

@@ -6,7 +6,7 @@ environment:
dependencies:
js: 0.6.4
stream_channel: 2.1.0
stream_channel: 2.1.1
test: 1.22.0
webkit_inspection_protocol: 1.0.0
stack_trace: 1.10.0