MIgrate dev_integration_tests_web to null safety (#80625)
This commit is contained in:
parent
dc43da9dd9
commit
0de20a3311
@ -17,7 +17,7 @@ import 'package:flutter/widgets.dart';
|
|||||||
// framework's ability to parse stack traces in all build modes.
|
// framework's ability to parse stack traces in all build modes.
|
||||||
void main() async {
|
void main() async {
|
||||||
final StringBuffer errorMessage = StringBuffer();
|
final StringBuffer errorMessage = StringBuffer();
|
||||||
debugPrint = (String message, { int wrapWidth }) {
|
debugPrint = (String? message, { int? wrapWidth }) {
|
||||||
errorMessage.writeln(message);
|
errorMessage.writeln(message);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -4,8 +4,8 @@
|
|||||||
|
|
||||||
import 'dart:html' as html;
|
import 'dart:html' as html;
|
||||||
Future<void> main() async {
|
Future<void> main() async {
|
||||||
await html.window.navigator.serviceWorker.ready;
|
await html.window.navigator.serviceWorker?.ready;
|
||||||
final String response = 'CLOSE?version=1';
|
final String response = 'CLOSE?version=1';
|
||||||
await html.HttpRequest.getString(response);
|
await html.HttpRequest.getString(response);
|
||||||
html.document.body.appendHtml(response);
|
html.document.body?.appendHtml(response);
|
||||||
}
|
}
|
||||||
|
@ -158,5 +158,5 @@ class StackFrameEquality implements Equality<StackFrame> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
bool isValidKey(Object o) => o is StackFrame;
|
bool isValidKey(Object? o) => o is StackFrame;
|
||||||
}
|
}
|
||||||
|
@ -11,7 +11,7 @@ Future<void> main() async {
|
|||||||
'/example',
|
'/example',
|
||||||
method: 'GET',
|
method: 'GET',
|
||||||
);
|
);
|
||||||
final String body = request.responseText;
|
final String? body = request.responseText;
|
||||||
if (body == 'This is an Example') {
|
if (body == 'This is an Example') {
|
||||||
print('--- TEST SUCCEEDED ---');
|
print('--- TEST SUCCEEDED ---');
|
||||||
} else {
|
} else {
|
||||||
|
@ -2,7 +2,7 @@ name: web_integration
|
|||||||
description: Integration test for web compilation.
|
description: Integration test for web compilation.
|
||||||
|
|
||||||
environment:
|
environment:
|
||||||
sdk: ">=2.6.0 <3.0.0"
|
sdk: ">=2.12.0 <3.0.0"
|
||||||
|
|
||||||
flutter:
|
flutter:
|
||||||
assets:
|
assets:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user