[web] Test harness fixes. (flutter/engine#37560)
This commit is contained in:
@@ -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',
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user