Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit 28c2de5

Browse files
committed
[web] Test harness fixes.
1 parent 036f8ea commit 28c2de5

File tree

4 files changed

+12
-5
lines changed

4 files changed

+12
-5
lines changed

lib/web_ui/dev/chrome.dart

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,10 +82,8 @@ class Chrome extends Browser {
8282
final String dir = environment.webUiDartToolDir.createTempSync('test_chrome_user_data_').resolveSymbolicLinksSync();
8383
final String jsFlags = enableWasmGC ? <String>[
8484
'--experimental-wasm-gc',
85-
'--wasm-gc-js-interop',
8685
'--experimental-wasm-stack-switching',
8786
'--experimental-wasm-type-reflection',
88-
'--wasm-gc-js-interop',
8987
].join(' ') : '';
9088
final List<String> args = <String>[
9189
if (jsFlags.isNotEmpty) '--js-flags=$jsFlags',

lib/web_ui/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ dev_dependencies:
2626
shelf_static: any
2727
shelf_web_socket: any
2828
stack_trace: any
29-
stream_channel: any
29+
stream_channel: 2.1.1
3030
test: 1.22.0
3131
test_api: any
3232
test_core: any

web_sdk/web_engine_tester/lib/static/host.dart

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,10 @@ import 'package:ui/src/engine/dom.dart';
1818

1919
/// A class defined in content shell, used to control its behavior.
2020
@JS()
21-
class _TestRunner {
21+
@staticInterop
22+
class _TestRunner {}
23+
24+
extension _TestRunnerExtension on _TestRunner {
2225
external void waitUntilDone();
2326
}
2427

@@ -30,17 +33,23 @@ external _TestRunner? get testRunner; // ignore: library_private_types_in_public
3033
///
3134
/// These are exposed so that tools like IDEs can interact with them via remote
3235
/// debugging.
36+
/// debugging.
3337
@JS()
3438
@anonymous
39+
@staticInterop
3540
class _JSApi {
3641
external factory _JSApi({void Function() resume, void Function() restartCurrent});
42+
}
3743

44+
extension _JSApiExtension on _JSApi {
3845
/// Causes the test runner to resume running, as though the user had clicked
3946
/// the "play" button.
47+
// ignore: unused_element
4048
external Function get resume;
4149

4250
/// Causes the test runner to restart the current test once it finishes
4351
/// running.
52+
// ignore: unused_element
4453
external Function get restartCurrent;
4554
}
4655

web_sdk/web_engine_tester/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ environment:
66

77
dependencies:
88
js: 0.6.4
9-
stream_channel: 2.1.0
9+
stream_channel: 2.1.1
1010
test: 1.22.0
1111
webkit_inspection_protocol: 1.0.0
1212
stack_trace: 1.10.0

0 commit comments

Comments
 (0)