MIgrate dev_integration_tests_web to null safety (#80625)

This commit is contained in:
Abhishek Ghaskata 2021-04-22 02:09:04 +05:30 committed by GitHub
parent dc43da9dd9
commit 0de20a3311
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 6 additions and 6 deletions

View File

@ -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);
}; };

View File

@ -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);
} }

View File

@ -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;
} }

View File

@ -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 {

View File

@ -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: