Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wip #2186

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft

wip #2186

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
124 changes: 62 additions & 62 deletions .github/workflows/dart.yml

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions pkgs/test/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 1.25.3-wip

* Require Dart 3.3

## 1.25.2

* Fix a bug running browser tests with paths containing windows directory
Expand Down
3 changes: 2 additions & 1 deletion pkgs/test/lib/src/runner/browser/compilers/dart2js.dart
Original file line number Diff line number Diff line change
Expand Up @@ -112,13 +112,14 @@ class Dart2JsSupport extends CompilerSupport with JsHtmlWrapper {
var jsPath = p.join(dir, '${p.basename(dartPath)}.browser_test.dart.js');
var bootstrapContent = '''
${suiteConfig.metadata.languageVersionComment ?? await rootPackageLanguageVersionComment}
import 'dart:js_interop';
import 'package:test/src/bootstrap/browser.dart';
import 'package:test/src/runner/browser/dom.dart' as dom;
import '${await absoluteUri(dartPath)}' as test;
void main() {
dom.window.console.log(r'Startup for test path $dartPath');
dom.window.console.log(r'Startup for test path $dartPath'.toJS);
internalBootstrapBrowserTest(() => test.main);
}
''';
Expand Down
9 changes: 4 additions & 5 deletions pkgs/test/lib/src/runner/browser/dom.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,9 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

import 'dart:js_interop';
import 'dart:js_util' as js_util;

import 'package:js/js.dart';

@JS()
@staticInterop
class Window extends EventTarget {}
Expand Down Expand Up @@ -38,8 +37,8 @@ external Window get window;
class Console {}

extension ConsoleExtension on Console {
external void log(Object? object);
external void warn(Object? object);
external void log(JSString object);
external void warn(JSString object);
}

@JS()
Expand Down Expand Up @@ -238,7 +237,7 @@ HTMLIFrameElement createHTMLIFrameElement() =>
class WebSocket extends EventTarget {}

extension WebSocketExtension on WebSocket {
external void send(Object? data);
external void send(JSAny? data);
}

WebSocket createWebSocket(String url) =>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

import 'dart:js_interop';
import 'dart:js_util';

import 'package:stream_channel/stream_channel.dart';
Expand All @@ -13,7 +14,7 @@ import 'dom.dart' as dom;
///
/// Sends a [MessagePort] to the host page for the channel.
StreamChannel<Object?> postMessageChannel() {
dom.window.console.log('Suite starting, sending channel to host');
dom.window.console.log('Suite starting, sending channel to host'.toJS);
var controller = StreamChannelController<Object?>(sync: true);
var channel = dom.createMessageChannel();
dom.window.parent
Expand Down
Loading
Loading