code format

This commit is contained in:
Lorenzo Pichilli 2022-10-14 02:28:23 +02:00
parent 8952030ef4
commit be58d859a4
79 changed files with 249 additions and 139 deletions

View File

@ -18,7 +18,8 @@ void setGetDelete() {
testWidgets('set, get, delete', (WidgetTester tester) async {
CookieManager cookieManager = CookieManager.instance();
final Completer<InAppWebViewController> controllerCompleter = Completer<InAppWebViewController>();
final Completer<InAppWebViewController> controllerCompleter =
Completer<InAppWebViewController>();
final Completer<String> pageLoaded = Completer<String>();
await tester.pumpWidget(
Directionality(
@ -52,7 +53,8 @@ void setGetDelete() {
cookie = await cookieManager.getCookie(url: url, name: "myCookie");
expect(cookie, isNull);
await cookieManager.deleteCookies(url: url, domain: ".${TEST_CROSS_PLATFORM_URL_1.host}");
await cookieManager.deleteCookies(
url: url, domain: ".${TEST_CROSS_PLATFORM_URL_1.host}");
cookies = await cookieManager.getCookies(url: url);
expect(cookies, isEmpty);
}, skip: shouldSkip);

View File

@ -41,8 +41,7 @@ void findInteractions() {
const firstSearchText = "InAppWebViewInitialFileTest";
await expectLater(
findInteractionController.findAll(find: firstSearchText),
completes);
findInteractionController.findAll(find: firstSearchText), completes);
expect(await findInteractionController.getSearchText(), firstSearchText);
if ([TargetPlatform.android].contains(defaultTargetPlatform)) {
await Future.delayed(Duration(seconds: 1));
@ -105,7 +104,8 @@ void findInteractions() {
await tester.pump();
await Future.delayed(Duration(seconds: 1));
await findInteractionController.findAll(find: "InAppWebViewInitialFileTest");
await findInteractionController.findAll(
find: "InAppWebViewInitialFileTest");
final int numberOfMatches = await numberOfMatchesCompleter.future;
expect(numberOfMatches, 2);
final session = await findInteractionController.getActiveFindSession();

View File

@ -17,7 +17,8 @@ void customSize() {
].contains(defaultTargetPlatform);
test('set and get custom size', () async {
final Completer<InAppWebViewController> controllerCompleter = Completer<InAppWebViewController>();
final Completer<InAppWebViewController> controllerCompleter =
Completer<InAppWebViewController>();
var headlessWebView = new HeadlessInAppWebView(
initialUrlRequest: URLRequest(url: TEST_CROSS_PLATFORM_URL_1),

View File

@ -16,7 +16,8 @@ void runAndDispose() {
].contains(defaultTargetPlatform);
test('run and dispose', () async {
final Completer<InAppWebViewController> controllerCompleter = Completer<InAppWebViewController>();
final Completer<InAppWebViewController> controllerCompleter =
Completer<InAppWebViewController>();
final Completer<void> pageLoaded = Completer<void>();
var headlessWebView = new HeadlessInAppWebView(

View File

@ -16,7 +16,8 @@ void setGetSettings() {
].contains(defaultTargetPlatform);
test('set/get settings', () async {
final Completer<InAppWebViewController> controllerCompleter = Completer<InAppWebViewController>();
final Completer<InAppWebViewController> controllerCompleter =
Completer<InAppWebViewController>();
final Completer<void> pageLoaded = Completer<void>();
var headlessWebView = new HeadlessInAppWebView(

View File

@ -16,7 +16,8 @@ void takeScreenshot() {
].contains(defaultTargetPlatform);
test('take screenshot', () async {
final Completer<InAppWebViewController> controllerCompleter = Completer<InAppWebViewController>();
final Completer<InAppWebViewController> controllerCompleter =
Completer<InAppWebViewController>();
final Completer<void> pageLoaded = Completer<void>();
var headlessWebView = new HeadlessInAppWebView(

View File

@ -17,7 +17,8 @@ void loadAssetFile(InAppLocalhostServer localhostServer) {
testWidgets('load asset file', (WidgetTester tester) async {
expect(localhostServer.isRunning(), true);
final Completer<InAppWebViewController> controllerCompleter = Completer<InAppWebViewController>();
final Completer<InAppWebViewController> controllerCompleter =
Completer<InAppWebViewController>();
await tester.pumpWidget(
Directionality(
textDirection: TextDirection.ltr,

View File

@ -17,7 +17,8 @@ void clearCache() {
].contains(defaultTargetPlatform);
testWidgets('clearCache', (WidgetTester tester) async {
final Completer<InAppWebViewController> controllerCompleter = Completer<InAppWebViewController>();
final Completer<InAppWebViewController> controllerCompleter =
Completer<InAppWebViewController>();
final Completer<void> pageLoaded = Completer<void>();
await tester.pumpWidget(

View File

@ -17,7 +17,8 @@ void clearFocus() {
].contains(defaultTargetPlatform);
testWidgets('clearFocus', (WidgetTester tester) async {
final Completer<InAppWebViewController> controllerCompleter = Completer<InAppWebViewController>();
final Completer<InAppWebViewController> controllerCompleter =
Completer<InAppWebViewController>();
final Completer<void> pageLoaded = Completer<void>();
await tester.pumpWidget(

View File

@ -15,7 +15,8 @@ void clearSslPreferences() {
].contains(defaultTargetPlatform);
testWidgets('clearSslPreferences', (WidgetTester tester) async {
final Completer<InAppWebViewController> controllerCompleter = Completer<InAppWebViewController>();
final Completer<InAppWebViewController> controllerCompleter =
Completer<InAppWebViewController>();
final Completer<void> pageLoaded = Completer<void>();
await tester.pumpWidget(

View File

@ -17,7 +17,8 @@ void contentBlocker() {
].contains(defaultTargetPlatform);
testWidgets('Content Blocker', (WidgetTester tester) async {
final Completer<InAppWebViewController> controllerCompleter = Completer<InAppWebViewController>();
final Completer<InAppWebViewController> controllerCompleter =
Completer<InAppWebViewController>();
final Completer<void> pageLoaded = Completer<void>();
await tester.pumpWidget(
Directionality(

View File

@ -16,7 +16,8 @@ void createPdf() {
].contains(defaultTargetPlatform);
testWidgets('createPdf', (WidgetTester tester) async {
final Completer<InAppWebViewController> controllerCompleter = Completer<InAppWebViewController>();
final Completer<InAppWebViewController> controllerCompleter =
Completer<InAppWebViewController>();
final Completer<void> pageLoaded = Completer<void>();
await tester.pumpWidget(

View File

@ -17,7 +17,8 @@ void getCertificate() {
].contains(defaultTargetPlatform);
testWidgets('getCertificate', (WidgetTester tester) async {
final Completer<InAppWebViewController> controllerCompleter = Completer<InAppWebViewController>();
final Completer<InAppWebViewController> controllerCompleter =
Completer<InAppWebViewController>();
final Completer<void> pageLoaded = Completer<void>();
await tester.pumpWidget(

View File

@ -19,7 +19,8 @@ void getContentHeight() {
var url = !kIsWeb ? TEST_CROSS_PLATFORM_URL_1 : TEST_WEB_PLATFORM_URL_1;
testWidgets('getContentHeight', (WidgetTester tester) async {
final Completer<InAppWebViewController> controllerCompleter = Completer<InAppWebViewController>();
final Completer<InAppWebViewController> controllerCompleter =
Completer<InAppWebViewController>();
final Completer<void> pageLoaded = Completer<void>();
await tester.pumpWidget(

View File

@ -19,7 +19,8 @@ void getFavicons() {
var url = !kIsWeb ? TEST_CROSS_PLATFORM_URL_1 : TEST_WEB_PLATFORM_URL_1;
testWidgets('getFavicons', (WidgetTester tester) async {
final Completer<InAppWebViewController> controllerCompleter = Completer<InAppWebViewController>();
final Completer<InAppWebViewController> controllerCompleter =
Completer<InAppWebViewController>();
final Completer<void> pageLoaded = Completer<void>();
await tester.pumpWidget(

View File

@ -19,7 +19,8 @@ void getHtml() {
var url = !kIsWeb ? TEST_CROSS_PLATFORM_URL_1 : TEST_WEB_PLATFORM_URL_1;
testWidgets('getHtml', (WidgetTester tester) async {
final Completer<InAppWebViewController> controllerCompleter = Completer<InAppWebViewController>();
final Completer<InAppWebViewController> controllerCompleter =
Completer<InAppWebViewController>();
final Completer<void> pageLoaded = Completer<void>();
await tester.pumpWidget(

View File

@ -19,7 +19,8 @@ void getMetaTags() {
var url = !kIsWeb ? TEST_CROSS_PLATFORM_URL_1 : TEST_WEB_PLATFORM_URL_1;
testWidgets('getMetaTags', (WidgetTester tester) async {
final Completer<InAppWebViewController> controllerCompleter = Completer<InAppWebViewController>();
final Completer<InAppWebViewController> controllerCompleter =
Completer<InAppWebViewController>();
final Completer<void> pageLoaded = Completer<void>();
await tester.pumpWidget(

View File

@ -19,7 +19,8 @@ void getMetaThemeColor() {
var url = !kIsWeb ? TEST_URL_1 : TEST_WEB_PLATFORM_URL_1;
testWidgets('getMetaThemeColor', (WidgetTester tester) async {
final Completer<InAppWebViewController> controllerCompleter = Completer<InAppWebViewController>();
final Completer<InAppWebViewController> controllerCompleter =
Completer<InAppWebViewController>();
final Completer<void> pageLoaded = Completer<void>();
await tester.pumpWidget(

View File

@ -19,7 +19,8 @@ void getOriginalUrl() {
var url = !kIsWeb ? TEST_URL_1 : TEST_WEB_PLATFORM_URL_1;
testWidgets('getOriginalUrl', (WidgetTester tester) async {
final Completer<InAppWebViewController> controllerCompleter = Completer<InAppWebViewController>();
final Completer<InAppWebViewController> controllerCompleter =
Completer<InAppWebViewController>();
final Completer<void> pageLoaded = Completer<void>();
await tester.pumpWidget(

View File

@ -17,7 +17,8 @@ void getProgress() {
].contains(defaultTargetPlatform);
testWidgets('getProgress', (WidgetTester tester) async {
final Completer<InAppWebViewController> controllerCompleter = Completer<InAppWebViewController>();
final Completer<InAppWebViewController> controllerCompleter =
Completer<InAppWebViewController>();
final Completer<void> pageLoaded = Completer<void>();
await tester.pumpWidget(

View File

@ -36,7 +36,8 @@ void getTitle() {
testWidgets('getTitle', (WidgetTester tester) async {
final Completer<void> pageStarted = Completer<void>();
final Completer<void> pageLoaded = Completer<void>();
final Completer<InAppWebViewController> controllerCompleter = Completer<InAppWebViewController>();
final Completer<InAppWebViewController> controllerCompleter =
Completer<InAppWebViewController>();
await tester.pumpWidget(
Directionality(

View File

@ -20,7 +20,8 @@ void httpAuthCredentialDatabase() {
testWidgets('use saved credentials', (WidgetTester tester) async {
HttpAuthCredentialDatabase httpAuthCredentialDatabase =
HttpAuthCredentialDatabase.instance();
final Completer<InAppWebViewController> controllerCompleter = Completer<InAppWebViewController>();
final Completer<InAppWebViewController> controllerCompleter =
Completer<InAppWebViewController>();
final Completer<void> pageLoaded = Completer<void>();
httpAuthCredentialDatabase.setHttpAuthCredential(
@ -84,7 +85,8 @@ void httpAuthCredentialDatabase() {
});
testWidgets('save credentials', (WidgetTester tester) async {
final Completer<InAppWebViewController> controllerCompleter = Completer<InAppWebViewController>();
final Completer<InAppWebViewController> controllerCompleter =
Completer<InAppWebViewController>();
final Completer<void> pageLoaded = Completer<void>();
await tester.pumpWidget(

View File

@ -27,7 +27,8 @@ void initialUrlRequest() {
testWidgets('launches with allowsBackForwardNavigationGestures true',
(WidgetTester tester) async {
final Completer<void> pageLoaded = Completer<void>();
final Completer<InAppWebViewController> controllerCompleter = Completer<InAppWebViewController>();
final Completer<InAppWebViewController> controllerCompleter =
Completer<InAppWebViewController>();
await tester.pumpWidget(
Directionality(
@ -67,7 +68,8 @@ void initialUrlRequest() {
testWidgets('basic', (WidgetTester tester) async {
final Completer<void> pageLoaded = Completer<void>();
final Completer<InAppWebViewController> controllerCompleter = Completer<InAppWebViewController>();
final Completer<InAppWebViewController> controllerCompleter =
Completer<InAppWebViewController>();
await tester.pumpWidget(
Directionality(

View File

@ -20,7 +20,8 @@ void injectCSS() {
group('inject CSS', () {
testWidgets('code', (WidgetTester tester) async {
final Completer<InAppWebViewController> controllerCompleter = Completer<InAppWebViewController>();
final Completer<InAppWebViewController> controllerCompleter =
Completer<InAppWebViewController>();
final Completer<void> pageLoaded = Completer<void>();
await tester.pumpWidget(
@ -58,7 +59,8 @@ void injectCSS() {
});
testWidgets('file from url', (WidgetTester tester) async {
final Completer<InAppWebViewController> controllerCompleter = Completer<InAppWebViewController>();
final Completer<InAppWebViewController> controllerCompleter =
Completer<InAppWebViewController>();
final Completer<void> pageLoaded = Completer<void>();
await tester.pumpWidget(
@ -93,7 +95,8 @@ void injectCSS() {
});
testWidgets('file from asset', (WidgetTester tester) async {
final Completer<InAppWebViewController> controllerCompleter = Completer<InAppWebViewController>();
final Completer<InAppWebViewController> controllerCompleter =
Completer<InAppWebViewController>();
final Completer<void> pageLoaded = Completer<void>();
await tester.pumpWidget(

View File

@ -20,7 +20,8 @@ void injectJavascriptFile() {
group('inject javascript file', () {
testWidgets('from url', (WidgetTester tester) async {
final Completer<InAppWebViewController> controllerCompleter = Completer<InAppWebViewController>();
final Completer<InAppWebViewController> controllerCompleter =
Completer<InAppWebViewController>();
final Completer<void> pageLoaded = Completer<void>();
final Completer<void> jQueryLoaded = Completer<void>();
final Completer<void> jQueryLoadError = Completer<void>();
@ -82,7 +83,8 @@ void injectJavascriptFile() {
});
testWidgets('from asset', (WidgetTester tester) async {
final Completer<InAppWebViewController> controllerCompleter = Completer<InAppWebViewController>();
final Completer<InAppWebViewController> controllerCompleter =
Completer<InAppWebViewController>();
final Completer<void> pageLoaded = Completer<void>();
await tester.pumpWidget(

View File

@ -19,7 +19,8 @@ void interceptAjaxRequest() {
group('intercept ajax request', () {
testWidgets('send string data', (WidgetTester tester) async {
final Completer<InAppWebViewController> controllerCompleter = Completer<InAppWebViewController>();
final Completer<InAppWebViewController> controllerCompleter =
Completer<InAppWebViewController>();
final Completer shouldInterceptAjaxPostRequestCompleter =
Completer<void>();
final Completer<Map<String, dynamic>> onAjaxReadyStateChangeCompleter =
@ -104,7 +105,8 @@ void interceptAjaxRequest() {
});
testWidgets('send json data', (WidgetTester tester) async {
final Completer<InAppWebViewController> controllerCompleter = Completer<InAppWebViewController>();
final Completer<InAppWebViewController> controllerCompleter =
Completer<InAppWebViewController>();
final Completer shouldInterceptAjaxPostRequestCompleter =
Completer<void>();
final Completer<Map<String, dynamic>> onAjaxReadyStateChangeCompleter =
@ -195,7 +197,8 @@ void interceptAjaxRequest() {
});
testWidgets('send URLSearchParams data', (WidgetTester tester) async {
final Completer<InAppWebViewController> controllerCompleter = Completer<InAppWebViewController>();
final Completer<InAppWebViewController> controllerCompleter =
Completer<InAppWebViewController>();
final Completer shouldInterceptAjaxPostRequestCompleter =
Completer<void>();
final Completer<Map<String, dynamic>> onAjaxReadyStateChangeCompleter =
@ -282,7 +285,8 @@ void interceptAjaxRequest() {
});
testWidgets('send FormData', (WidgetTester tester) async {
final Completer<InAppWebViewController> controllerCompleter = Completer<InAppWebViewController>();
final Completer<InAppWebViewController> controllerCompleter =
Completer<InAppWebViewController>();
final Completer shouldInterceptAjaxPostRequestCompleter =
Completer<void>();
final Completer<Map<String, dynamic>> onAjaxReadyStateChangeCompleter =

View File

@ -19,7 +19,8 @@ void interceptFetchRequest() {
group('intercept fetch request', () {
testWidgets('send string data', (WidgetTester tester) async {
final Completer<InAppWebViewController> controllerCompleter = Completer<InAppWebViewController>();
final Completer<InAppWebViewController> controllerCompleter =
Completer<InAppWebViewController>();
final Completer<Map<String, dynamic>> fetchPostCompleter =
Completer<Map<String, dynamic>>();
final Completer<void> shouldInterceptFetchPostRequestCompleter =
@ -97,7 +98,8 @@ void interceptFetchRequest() {
});
testWidgets('send json data', (WidgetTester tester) async {
final Completer<InAppWebViewController> controllerCompleter = Completer<InAppWebViewController>();
final Completer<InAppWebViewController> controllerCompleter =
Completer<InAppWebViewController>();
final Completer<Map<String, dynamic>> fetchPostCompleter =
Completer<Map<String, dynamic>>();
final Completer<void> shouldInterceptFetchPostRequestCompleter =
@ -181,7 +183,8 @@ void interceptFetchRequest() {
});
testWidgets('send URLSearchParams data', (WidgetTester tester) async {
final Completer<InAppWebViewController> controllerCompleter = Completer<InAppWebViewController>();
final Completer<InAppWebViewController> controllerCompleter =
Completer<InAppWebViewController>();
final Completer<Map<String, dynamic>> fetchPostCompleter =
Completer<Map<String, dynamic>>();
final Completer<void> shouldInterceptFetchPostRequestCompleter =
@ -261,7 +264,8 @@ void interceptFetchRequest() {
});
testWidgets('send FormData', (WidgetTester tester) async {
final Completer<InAppWebViewController> controllerCompleter = Completer<InAppWebViewController>();
final Completer<InAppWebViewController> controllerCompleter =
Completer<InAppWebViewController>();
final Completer<Map<String, dynamic>> fetchPostCompleter =
Completer<Map<String, dynamic>>();
final Completer<void> shouldInterceptFetchPostRequestCompleter =

View File

@ -17,7 +17,8 @@ void isLoading() {
].contains(defaultTargetPlatform);
testWidgets('isLoading', (WidgetTester tester) async {
final Completer<InAppWebViewController> controllerCompleter = Completer<InAppWebViewController>();
final Completer<InAppWebViewController> controllerCompleter =
Completer<InAppWebViewController>();
final Completer<void> pageStarted = Completer<void>();
final Completer<void> pageLoaded = Completer<void>();

View File

@ -19,7 +19,8 @@ void isSecureContext() {
var url = !kIsWeb ? TEST_CROSS_PLATFORM_URL_1 : TEST_WEB_PLATFORM_URL_1;
testWidgets('isSecureContext', (WidgetTester tester) async {
final Completer<InAppWebViewController> controllerCompleter = Completer<InAppWebViewController>();
final Completer<InAppWebViewController> controllerCompleter =
Completer<InAppWebViewController>();
final StreamController<String> pageLoads =
StreamController<String>.broadcast();

View File

@ -26,7 +26,8 @@ void javascriptCodeEvaluation() {
].contains(defaultTargetPlatform);
testWidgets('evaluateJavascript', (WidgetTester tester) async {
final Completer<InAppWebViewController> controllerCompleter = Completer<InAppWebViewController>();
final Completer<InAppWebViewController> controllerCompleter =
Completer<InAppWebViewController>();
final Completer<void> pageLoaded = Completer<void>();
await tester.pumpWidget(
@ -69,7 +70,8 @@ void javascriptCodeEvaluation() {
testWidgets('evaluateJavascript with content world',
(WidgetTester tester) async {
final Completer<InAppWebViewController> controllerCompleter = Completer<InAppWebViewController>();
final Completer<InAppWebViewController> controllerCompleter =
Completer<InAppWebViewController>();
final Completer<void> pageLoaded = Completer<void>();
await tester.pumpWidget(
@ -112,7 +114,8 @@ void javascriptCodeEvaluation() {
].contains(defaultTargetPlatform);
testWidgets('callAsyncJavaScript', (WidgetTester tester) async {
final Completer<InAppWebViewController> controllerCompleter = Completer<InAppWebViewController>();
final Completer<InAppWebViewController> controllerCompleter =
Completer<InAppWebViewController>();
final Completer<void> pageLoaded = Completer<void>();
await tester.pumpWidget(
@ -173,7 +176,8 @@ void javascriptCodeEvaluation() {
testWidgets('callAsyncJavaScript with content world',
(WidgetTester tester) async {
final Completer<InAppWebViewController> controllerCompleter = Completer<InAppWebViewController>();
final Completer<InAppWebViewController> controllerCompleter =
Completer<InAppWebViewController>();
final Completer<void> pageLoaded = Completer<void>();
await tester.pumpWidget(

View File

@ -15,7 +15,8 @@ void javascriptDialogs() {
].contains(defaultTargetPlatform);
testWidgets('javascript dialogs', (WidgetTester tester) async {
final Completer<InAppWebViewController> controllerCompleter = Completer<InAppWebViewController>();
final Completer<InAppWebViewController> controllerCompleter =
Completer<InAppWebViewController>();
final Completer<void> pageLoaded = Completer<void>();
final Completer<JsAlertRequest> alertCompleter =
Completer<JsAlertRequest>();

View File

@ -17,7 +17,8 @@ void javascriptHandler() {
].contains(defaultTargetPlatform);
testWidgets('JavaScript Handler', (WidgetTester tester) async {
final Completer<InAppWebViewController> controllerCompleter = Completer<InAppWebViewController>();
final Completer<InAppWebViewController> controllerCompleter =
Completer<InAppWebViewController>();
final Completer<void> pageStarted = Completer<void>();
final Completer<void> pageLoaded = Completer<void>();
final Completer<void> handlerFoo = Completer<void>();

View File

@ -17,7 +17,8 @@ void loadData() {
].contains(defaultTargetPlatform);
testWidgets('loadData', (WidgetTester tester) async {
final Completer<InAppWebViewController> controllerCompleter = Completer<InAppWebViewController>();
final Completer<InAppWebViewController> controllerCompleter =
Completer<InAppWebViewController>();
final StreamController<String> pageLoads =
StreamController<String>.broadcast();

View File

@ -17,7 +17,8 @@ void loadFile() {
].contains(defaultTargetPlatform);
testWidgets('loadFile', (WidgetTester tester) async {
final Completer<InAppWebViewController> controllerCompleter = Completer<InAppWebViewController>();
final Completer<InAppWebViewController> controllerCompleter =
Completer<InAppWebViewController>();
final StreamController<String> pageLoads =
StreamController<String>.broadcast();

View File

@ -20,7 +20,8 @@ void loadUrl() {
var initialUrl = !kIsWeb ? TEST_URL_1 : TEST_WEB_PLATFORM_URL_1;
testWidgets('loadUrl', (WidgetTester tester) async {
final Completer<InAppWebViewController> controllerCompleter = Completer<InAppWebViewController>();
final Completer<InAppWebViewController> controllerCompleter =
Completer<InAppWebViewController>();
final Completer<String> firstUrlLoad = Completer<String>();
final Completer<String> loadedUrl = Completer<String>();
@ -61,7 +62,8 @@ void loadUrl() {
].contains(defaultTargetPlatform);
testWidgets('loadSimulatedRequest', (WidgetTester tester) async {
final Completer<InAppWebViewController> controllerCompleter = Completer<InAppWebViewController>();
final Completer<InAppWebViewController> controllerCompleter =
Completer<InAppWebViewController>();
final Completer<String> firstUrlLoad = Completer<String>();
final Completer<String> loadedUrl = Completer<String>();

View File

@ -17,7 +17,8 @@ void onConsoleMessage() {
].contains(defaultTargetPlatform);
testWidgets('onConsoleMessage', (WidgetTester tester) async {
final Completer<InAppWebViewController> controllerCompleter = Completer<InAppWebViewController>();
final Completer<InAppWebViewController> controllerCompleter =
Completer<InAppWebViewController>();
final Completer<ConsoleMessage> onConsoleMessageCompleter =
Completer<ConsoleMessage>();
await tester.pumpWidget(

View File

@ -17,7 +17,8 @@ void onDownloadStartRequest() {
].contains(defaultTargetPlatform);
testWidgets('onDownloadStartRequest', (WidgetTester tester) async {
final Completer<InAppWebViewController> controllerCompleter = Completer<InAppWebViewController>();
final Completer<InAppWebViewController> controllerCompleter =
Completer<InAppWebViewController>();
final Completer<String> onDownloadStartCompleter = Completer<String>();
await tester.pumpWidget(
Directionality(

View File

@ -13,7 +13,8 @@ void onJsBeforeUnload() {
final shouldSkip = true;
// on Android, for some reason, it works on an example app but not in this test
testWidgets('onJsBeforeUnload', (WidgetTester tester) async {
final Completer<InAppWebViewController> controllerCompleter = Completer<InAppWebViewController>();
final Completer<InAppWebViewController> controllerCompleter =
Completer<InAppWebViewController>();
final Completer<String> onJsBeforeUnloadCompleter = Completer<String>();
await tester.pumpWidget(

View File

@ -16,7 +16,8 @@ void onLoadResourceWithCustomScheme() {
].contains(defaultTargetPlatform);
testWidgets('onLoadResourceWithCustomScheme', (WidgetTester tester) async {
final Completer<InAppWebViewController> controllerCompleter = Completer<InAppWebViewController>();
final Completer<InAppWebViewController> controllerCompleter =
Completer<InAppWebViewController>();
final Completer<void> imageLoaded = Completer<void>();
await tester.pumpWidget(

View File

@ -17,7 +17,8 @@ void onNavigationResponse() {
group("onNavigationResponse", () {
testWidgets('allow navigation', (WidgetTester tester) async {
final Completer<InAppWebViewController> controllerCompleter = Completer<InAppWebViewController>();
final Completer<InAppWebViewController> controllerCompleter =
Completer<InAppWebViewController>();
final Completer<void> pageLoaded = Completer<void>();
final Completer<String> onNavigationResponseCompleter =
Completer<String>();
@ -51,7 +52,8 @@ void onNavigationResponse() {
});
testWidgets('cancel navigation', (WidgetTester tester) async {
final Completer<InAppWebViewController> controllerCompleter = Completer<InAppWebViewController>();
final Completer<InAppWebViewController> controllerCompleter =
Completer<InAppWebViewController>();
final Completer<void> pageLoaded = Completer<void>();
final Completer<String> onNavigationResponseCompleter =
Completer<String>();

View File

@ -17,7 +17,8 @@ void onPageCommitVisible() {
].contains(defaultTargetPlatform);
testWidgets('onPageCommitVisible', (WidgetTester tester) async {
final Completer<InAppWebViewController> controllerCompleter = Completer<InAppWebViewController>();
final Completer<InAppWebViewController> controllerCompleter =
Completer<InAppWebViewController>();
final Completer<String> onPageCommitVisibleCompleter = Completer<String>();
await tester.pumpWidget(

View File

@ -20,7 +20,8 @@ void onPermissionRequest() {
expectedValue = [PermissionResourceType.CAMERA];
testWidgets('onPermissionRequest', (WidgetTester tester) async {
final Completer<InAppWebViewController> controllerCompleter = Completer<InAppWebViewController>();
final Completer<InAppWebViewController> controllerCompleter =
Completer<InAppWebViewController>();
final Completer<void> pageLoaded = Completer<void>();
final Completer<List<PermissionResourceType>> onPermissionRequestCompleter =
Completer<List<PermissionResourceType>>();

View File

@ -15,7 +15,8 @@ void onReceivedIcon() {
].contains(defaultTargetPlatform);
testWidgets('onReceivedIcon', (WidgetTester tester) async {
final Completer<InAppWebViewController> controllerCompleter = Completer<InAppWebViewController>();
final Completer<InAppWebViewController> controllerCompleter =
Completer<InAppWebViewController>();
final Completer<void> pageLoaded = Completer<void>();
final Completer<Uint8List> onReceivedIconCompleter = Completer<Uint8List>();

View File

@ -13,7 +13,8 @@ void onReceivedTouchIconUrl() {
].contains(defaultTargetPlatform);
testWidgets('onReceivedTouchIconUrl', (WidgetTester tester) async {
final Completer<InAppWebViewController> controllerCompleter = Completer<InAppWebViewController>();
final Completer<InAppWebViewController> controllerCompleter =
Completer<InAppWebViewController>();
final Completer<String> onReceivedTouchIconUrlCompleter =
Completer<String>();

View File

@ -19,7 +19,8 @@ void onScrollChanged() {
var url = !kIsWeb ? TEST_URL_1 : TEST_WEB_PLATFORM_URL_1;
testWidgets('onScrollChanged', (WidgetTester tester) async {
final Completer<InAppWebViewController> controllerCompleter = Completer<InAppWebViewController>();
final Completer<InAppWebViewController> controllerCompleter =
Completer<InAppWebViewController>();
final Completer<void> pageLoaded = Completer<void>();
final Completer<void> onScrollChangedCompleter = Completer<void>();
await tester.pumpWidget(

View File

@ -19,7 +19,8 @@ void onTitleChanged() {
var url = !kIsWeb ? TEST_URL_1 : TEST_WEB_PLATFORM_URL_1;
testWidgets('onTitleChanged', (WidgetTester tester) async {
final Completer<InAppWebViewController> controllerCompleter = Completer<InAppWebViewController>();
final Completer<InAppWebViewController> controllerCompleter =
Completer<InAppWebViewController>();
final Completer<void> pageLoaded = Completer<void>();
final Completer<void> onTitleChangedCompleter = Completer<void>();

View File

@ -19,7 +19,8 @@ void onUpdateVisitedHistory() {
var url = !kIsWeb ? TEST_CROSS_PLATFORM_URL_1 : TEST_WEB_PLATFORM_URL_1;
testWidgets('onUpdateVisitedHistory', (WidgetTester tester) async {
final Completer<InAppWebViewController> controllerCompleter = Completer<InAppWebViewController>();
final Completer<InAppWebViewController> controllerCompleter =
Completer<InAppWebViewController>();
final Completer<String> firstPushCompleter = Completer<String>();
final Completer<String> secondPushCompleter = Completer<String>();
final Completer<void> pageLoaded = Completer<void>();

View File

@ -15,7 +15,8 @@ void pageDownUp() {
].contains(defaultTargetPlatform);
testWidgets('pageDown/pageUp', (WidgetTester tester) async {
final Completer<InAppWebViewController> controllerCompleter = Completer<InAppWebViewController>();
final Completer<InAppWebViewController> controllerCompleter =
Completer<InAppWebViewController>();
final Completer<void> pageLoaded = Completer<void>();
await tester.pumpWidget(

View File

@ -15,7 +15,8 @@ void pauseResume() {
].contains(defaultTargetPlatform);
testWidgets('pause/resume', (WidgetTester tester) async {
final Completer<InAppWebViewController> controllerCompleter = Completer<InAppWebViewController>();
final Completer<InAppWebViewController> controllerCompleter =
Completer<InAppWebViewController>();
final Completer<void> pageLoaded = Completer<void>();
await tester.pumpWidget(

View File

@ -17,7 +17,8 @@ void pauseResumeTimers() {
].contains(defaultTargetPlatform);
testWidgets('pause/resume timers', (WidgetTester tester) async {
final Completer<InAppWebViewController> controllerCompleter = Completer<InAppWebViewController>();
final Completer<InAppWebViewController> controllerCompleter =
Completer<InAppWebViewController>();
final Completer<void> pageLoaded = Completer<void>();
await tester.pumpWidget(

View File

@ -19,7 +19,8 @@ void postRequests() {
group('POST requests', () {
testWidgets('initialUrlRequest', (WidgetTester tester) async {
final Completer<InAppWebViewController> controllerCompleter = Completer<InAppWebViewController>();
final Completer<InAppWebViewController> controllerCompleter =
Completer<InAppWebViewController>();
final Completer<void> postPageLoaded = Completer<void>();
await tester.pumpWidget(
@ -57,7 +58,8 @@ void postRequests() {
});
testWidgets('loadUrl', (WidgetTester tester) async {
final Completer<InAppWebViewController> controllerCompleter = Completer<InAppWebViewController>();
final Completer<InAppWebViewController> controllerCompleter =
Completer<InAppWebViewController>();
final Completer<void> postPageLoaded = Completer<void>();
await tester.pumpWidget(
@ -102,7 +104,8 @@ void postRequests() {
});
testWidgets('postUrl', (WidgetTester tester) async {
final Completer<InAppWebViewController> controllerCompleter = Completer<InAppWebViewController>();
final Completer<InAppWebViewController> controllerCompleter =
Completer<InAppWebViewController>();
final Completer<void> postPageLoaded = Completer<void>();
await tester.pumpWidget(

View File

@ -19,7 +19,8 @@ void printCurrentPage() {
var url = !kIsWeb ? TEST_CROSS_PLATFORM_URL_1 : TEST_WEB_PLATFORM_URL_1;
testWidgets('printCurrentPage', (WidgetTester tester) async {
final Completer<InAppWebViewController> controllerCompleter = Completer<InAppWebViewController>();
final Completer<InAppWebViewController> controllerCompleter =
Completer<InAppWebViewController>();
final Completer<void> pageLoaded = Completer<void>();
await tester.pumpWidget(

View File

@ -57,7 +57,8 @@ void programmaticScroll() {
: TEST_WEB_PLATFORM_URL_1;
final Completer<void> pageLoaded = Completer<void>();
final Completer<InAppWebViewController> controllerCompleter = Completer<InAppWebViewController>();
final Completer<InAppWebViewController> controllerCompleter =
Completer<InAppWebViewController>();
await tester.pumpWidget(
Directionality(
@ -134,7 +135,8 @@ void programmaticScroll() {
base64Encode(const Utf8Encoder().convert(scrollTestPage));
final Completer<void> pageLoaded = Completer<void>();
final Completer<InAppWebViewController> controllerCompleter = Completer<InAppWebViewController>();
final Completer<InAppWebViewController> controllerCompleter =
Completer<InAppWebViewController>();
await tester.pumpWidget(
Directionality(

View File

@ -24,7 +24,8 @@ void programmaticZoomScale() {
].contains(defaultTargetPlatform);
testWidgets('zoomIn/zoomOut', (WidgetTester tester) async {
final Completer<InAppWebViewController> controllerCompleter = Completer<InAppWebViewController>();
final Completer<InAppWebViewController> controllerCompleter =
Completer<InAppWebViewController>();
final Completer<void> pageLoaded = Completer<void>();
await tester.pumpWidget(
@ -52,7 +53,8 @@ void programmaticZoomScale() {
}, skip: shouldSkipTest1);
testWidgets('onZoomScaleChanged', (WidgetTester tester) async {
final Completer<InAppWebViewController> controllerCompleter = Completer<InAppWebViewController>();
final Completer<InAppWebViewController> controllerCompleter =
Completer<InAppWebViewController>();
final Completer<void> pageLoaded = Completer<void>();
final Completer<void> onZoomScaleChangedCompleter = Completer<void>();
@ -92,7 +94,8 @@ void programmaticZoomScale() {
});
testWidgets('zoomBy', (WidgetTester tester) async {
final Completer<InAppWebViewController> controllerCompleter = Completer<InAppWebViewController>();
final Completer<InAppWebViewController> controllerCompleter =
Completer<InAppWebViewController>();
final Completer<void> pageLoaded = Completer<void>();
await tester.pumpWidget(
@ -121,7 +124,8 @@ void programmaticZoomScale() {
});
testWidgets('getZoomScale', (WidgetTester tester) async {
final Completer<InAppWebViewController> controllerCompleter = Completer<InAppWebViewController>();
final Completer<InAppWebViewController> controllerCompleter =
Completer<InAppWebViewController>();
final Completer<void> pageLoaded = Completer<void>();
await tester.pumpWidget(

View File

@ -18,7 +18,8 @@ void pullToRefresh() {
testWidgets('launches with pull-to-refresh feature',
(WidgetTester tester) async {
final Completer<InAppWebViewController> controllerCompleter = Completer<InAppWebViewController>();
final Completer<InAppWebViewController> controllerCompleter =
Completer<InAppWebViewController>();
final pullToRefreshController = PullToRefreshController(
settings: PullToRefreshSettings(
color: Colors.blue,

View File

@ -27,7 +27,8 @@ void reload() {
].contains(defaultTargetPlatform);
testWidgets('from origin', (WidgetTester tester) async {
final Completer<InAppWebViewController> controllerCompleter = Completer<InAppWebViewController>();
final Completer<InAppWebViewController> controllerCompleter =
Completer<InAppWebViewController>();
final Completer<void> pageLoaded = Completer<void>();
await tester.pumpWidget(
@ -55,7 +56,8 @@ void reload() {
}, skip: shouldSkipTest1);
testWidgets('basic', (WidgetTester tester) async {
final Completer<InAppWebViewController> controllerCompleter = Completer<InAppWebViewController>();
final Completer<InAppWebViewController> controllerCompleter =
Completer<InAppWebViewController>();
final StreamController<String> pageLoads =
StreamController<String>.broadcast();

View File

@ -17,7 +17,8 @@ void requestFocusNodeHref() {
].contains(defaultTargetPlatform);
testWidgets('requestFocusNodeHref', (WidgetTester tester) async {
final Completer<InAppWebViewController> controllerCompleter = Completer<InAppWebViewController>();
final Completer<InAppWebViewController> controllerCompleter =
Completer<InAppWebViewController>();
final Completer<void> pageLoaded = Completer<void>();
await tester.pumpWidget(

View File

@ -17,7 +17,8 @@ void requestImageRef() {
].contains(defaultTargetPlatform);
testWidgets('requestImageRef', (WidgetTester tester) async {
final Completer<InAppWebViewController> controllerCompleter = Completer<InAppWebViewController>();
final Completer<InAppWebViewController> controllerCompleter =
Completer<InAppWebViewController>();
final Completer<void> pageLoaded = Completer<void>();
await tester.pumpWidget(

View File

@ -37,7 +37,8 @@ void resizeWebView() {
final Completer<void> resizeCompleter = Completer<void>();
final Completer<void> pageStarted = Completer<void>();
final Completer<void> pageLoaded = Completer<void>();
final Completer<InAppWebViewController> controllerCompleter = Completer<InAppWebViewController>();
final Completer<InAppWebViewController> controllerCompleter =
Completer<InAppWebViewController>();
final GlobalKey key = GlobalKey();
final InAppWebView webView = InAppWebView(

View File

@ -19,7 +19,8 @@ void setGetSettings() {
final url = !kIsWeb ? TEST_CROSS_PLATFORM_URL_1 : TEST_WEB_PLATFORM_URL_1;
testWidgets('set/get settings', (WidgetTester tester) async {
final Completer<InAppWebViewController> controllerCompleter = Completer<InAppWebViewController>();
final Completer<InAppWebViewController> controllerCompleter =
Completer<InAppWebViewController>();
final Completer<void> pageLoaded = Completer<void>();
await tester.pumpWidget(

View File

@ -20,7 +20,8 @@ void shouldInterceptRequest() {
];
List<String> resourceLoaded = [];
final Completer<InAppWebViewController> controllerCompleter = Completer<InAppWebViewController>();
final Completer<InAppWebViewController> controllerCompleter =
Completer<InAppWebViewController>();
final Completer<void> pageLoaded = Completer<void>();
final Completer<void> loadedResourceCompleter = Completer<void>();

View File

@ -24,7 +24,8 @@ void shouldOverrideUrlLoading() {
base64Encode(const Utf8Encoder().convert(page));
testWidgets('can allow requests', (WidgetTester tester) async {
final Completer<InAppWebViewController> controllerCompleter = Completer<InAppWebViewController>();
final Completer<InAppWebViewController> controllerCompleter =
Completer<InAppWebViewController>();
final StreamController<String> pageLoads =
StreamController<String>.broadcast();
await tester.pumpWidget(
@ -76,7 +77,8 @@ void shouldOverrideUrlLoading() {
testWidgets(
'allow requests on iOS only if navigationType == NavigationType.LINK_ACTIVATED',
(WidgetTester tester) async {
final Completer<InAppWebViewController> controllerCompleter = Completer<InAppWebViewController>();
final Completer<InAppWebViewController> controllerCompleter =
Completer<InAppWebViewController>();
final StreamController<String> pageLoads =
StreamController<String>.broadcast();
await tester.pumpWidget(
@ -134,7 +136,8 @@ void shouldOverrideUrlLoading() {
}, skip: shouldSkipTest2);
testWidgets('can block requests', (WidgetTester tester) async {
final Completer<InAppWebViewController> controllerCompleter = Completer<InAppWebViewController>();
final Completer<InAppWebViewController> controllerCompleter =
Completer<InAppWebViewController>();
final StreamController<String> pageLoads =
StreamController<String>.broadcast();
await tester.pumpWidget(
@ -185,7 +188,8 @@ void shouldOverrideUrlLoading() {
});
testWidgets('supports asynchronous decisions', (WidgetTester tester) async {
final Completer<InAppWebViewController> controllerCompleter = Completer<InAppWebViewController>();
final Completer<InAppWebViewController> controllerCompleter =
Completer<InAppWebViewController>();
final StreamController<String> pageLoads =
StreamController<String>.broadcast();
await tester.pumpWidget(

View File

@ -17,7 +17,8 @@ void sslRequest() {
].contains(defaultTargetPlatform);
testWidgets('SSL request', (WidgetTester tester) async {
final Completer<InAppWebViewController> controllerCompleter = Completer<InAppWebViewController>();
final Completer<InAppWebViewController> controllerCompleter =
Completer<InAppWebViewController>();
final Completer<void> pageLoaded = Completer<void>();
await tester.pumpWidget(
Directionality(

View File

@ -18,7 +18,8 @@ void stopLoading() {
].contains(defaultTargetPlatform);
testWidgets('stopLoading', (WidgetTester tester) async {
final Completer<InAppWebViewController> controllerCompleter = Completer<InAppWebViewController>();
final Completer<InAppWebViewController> controllerCompleter =
Completer<InAppWebViewController>();
final Completer<void> pageLoaded = Completer<void>();
await tester.pumpWidget(

View File

@ -17,7 +17,8 @@ void tRexRunnerGame() {
].contains(defaultTargetPlatform);
testWidgets('T-Rex Runner game', (WidgetTester tester) async {
final Completer<InAppWebViewController> controllerCompleter = Completer<InAppWebViewController>();
final Completer<InAppWebViewController> controllerCompleter =
Completer<InAppWebViewController>();
final Completer<void> pageLoaded = Completer<void>();
await tester.pumpWidget(

View File

@ -17,7 +17,8 @@ void takeScreenshot() {
].contains(defaultTargetPlatform);
testWidgets('takeScreenshot', (WidgetTester tester) async {
final Completer<InAppWebViewController> controllerCompleter = Completer<InAppWebViewController>();
final Completer<InAppWebViewController> controllerCompleter =
Completer<InAppWebViewController>();
final Completer<void> pageLoaded = Completer<void>();
await tester.pumpWidget(

View File

@ -19,7 +19,8 @@ void userScripts() {
group('user scripts', () {
testWidgets('initialUserScripts', (WidgetTester tester) async {
final Completer<InAppWebViewController> controllerCompleter = Completer<InAppWebViewController>();
final Completer<InAppWebViewController> controllerCompleter =
Completer<InAppWebViewController>();
final Completer<void> pageLoaded = Completer<void>();
await tester.pumpWidget(
@ -77,7 +78,8 @@ void userScripts() {
});
testWidgets('add/remove user scripts', (WidgetTester tester) async {
final Completer<InAppWebViewController> controllerCompleter = Completer<InAppWebViewController>();
final Completer<InAppWebViewController> controllerCompleter =
Completer<InAppWebViewController>();
final StreamController<String> pageLoads =
StreamController<String>.broadcast();

View File

@ -27,7 +27,8 @@ void webArchive() {
].contains(defaultTargetPlatform);
testWidgets('create data', (WidgetTester tester) async {
final Completer<InAppWebViewController> controllerCompleter = Completer<InAppWebViewController>();
final Completer<InAppWebViewController> controllerCompleter =
Completer<InAppWebViewController>();
final Completer<void> pageLoaded = Completer<void>();
await tester.pumpWidget(
@ -54,7 +55,8 @@ void webArchive() {
}, skip: shouldSkipTest1);
testWidgets('save', (WidgetTester tester) async {
final Completer<InAppWebViewController> controllerCompleter = Completer<InAppWebViewController>();
final Completer<InAppWebViewController> controllerCompleter =
Completer<InAppWebViewController>();
final Completer<void> pageLoaded = Completer<void>();
await tester.pumpWidget(

View File

@ -27,7 +27,8 @@ void webHistory() {
testWidgets('get history list and go back/forward',
(WidgetTester tester) async {
final Completer<InAppWebViewController> controllerCompleter = Completer<InAppWebViewController>();
final Completer<InAppWebViewController> controllerCompleter =
Completer<InAppWebViewController>();
await tester.pumpWidget(
Directionality(
@ -124,7 +125,8 @@ void webHistory() {
final shouldSkipTest2 = !kIsWeb;
testWidgets('go back/forward on web platform', (WidgetTester tester) async {
final Completer<InAppWebViewController> controllerCompleter = Completer<InAppWebViewController>();
final Completer<InAppWebViewController> controllerCompleter =
Completer<InAppWebViewController>();
final StreamController<String> pageLoads =
StreamController<String>.broadcast();
@ -182,7 +184,8 @@ void webHistory() {
].contains(defaultTargetPlatform);
testWidgets('clearHistory', (WidgetTester tester) async {
final Completer<InAppWebViewController> controllerCompleter = Completer<InAppWebViewController>();
final Completer<InAppWebViewController> controllerCompleter =
Completer<InAppWebViewController>();
final StreamController<String> pageLoads =
StreamController<String>.broadcast();

View File

@ -18,7 +18,8 @@ void webMessage() {
group('WebMessage', () {
testWidgets('WebMessageChannel', (WidgetTester tester) async {
final Completer<InAppWebViewController> controllerCompleter = Completer<InAppWebViewController>();
final Completer<InAppWebViewController> controllerCompleter =
Completer<InAppWebViewController>();
final Completer webMessageCompleter = Completer<String>();
await tester.pumpWidget(
Directionality(
@ -85,7 +86,8 @@ void webMessage() {
});
testWidgets('WebMessageListener', (WidgetTester tester) async {
final Completer<InAppWebViewController> controllerCompleter = Completer<InAppWebViewController>();
final Completer<InAppWebViewController> controllerCompleter =
Completer<InAppWebViewController>();
final Completer<void> pageLoaded = Completer<void>();
final Completer webMessageCompleter = Completer<String>();
await tester.pumpWidget(

View File

@ -27,7 +27,8 @@ void webViewWindows() {
].contains(defaultTargetPlatform);
testWidgets('onCreateWindow return false', (WidgetTester tester) async {
final Completer<InAppWebViewController> controllerCompleter = Completer<InAppWebViewController>();
final Completer<InAppWebViewController> controllerCompleter =
Completer<InAppWebViewController>();
final Completer<void> pageLoaded = Completer<void>();
await tester.pumpWidget(
Directionality(
@ -68,7 +69,8 @@ void webViewWindows() {
].contains(defaultTargetPlatform);
testWidgets('onCreateWindow return true', (WidgetTester tester) async {
final Completer<InAppWebViewController> controllerCompleter = Completer<InAppWebViewController>();
final Completer<InAppWebViewController> controllerCompleter =
Completer<InAppWebViewController>();
final Completer<int> onCreateWindowCompleter = Completer<int>();
await tester.pumpWidget(
Directionality(
@ -140,7 +142,8 @@ void webViewWindows() {
testWidgets('window.open() with target _blank opens in same window',
(WidgetTester tester) async {
final Completer<InAppWebViewController> controllerCompleter = Completer<InAppWebViewController>();
final Completer<InAppWebViewController> controllerCompleter =
Completer<InAppWebViewController>();
final StreamController<String> pageLoads =
StreamController<String>.broadcast();
await tester.pumpWidget(
@ -182,7 +185,8 @@ void webViewWindows() {
].contains(defaultTargetPlatform);
// on Android, for some reason, it works on an example app but not in this test
testWidgets('can open new window and go back', (WidgetTester tester) async {
final Completer<InAppWebViewController> controllerCompleter = Completer<InAppWebViewController>();
final Completer<InAppWebViewController> controllerCompleter =
Completer<InAppWebViewController>();
final StreamController<String> pageLoads =
StreamController<String>.broadcast();
await tester.pumpWidget(
@ -264,7 +268,8 @@ void webViewWindows() {
''';
final String openWindowTestBase64 =
base64Encode(const Utf8Encoder().convert(openWindowTest));
final Completer<InAppWebViewController> controllerCompleter = Completer<InAppWebViewController>();
final Completer<InAppWebViewController> controllerCompleter =
Completer<InAppWebViewController>();
final Completer<void> pageLoadCompleter = Completer<void>();
await tester.pumpWidget(
@ -307,7 +312,8 @@ void webViewWindows() {
final shouldSkipTest6 = true;
// on Web, opening a new window during tests makes crash
testWidgets('onCreateWindow called on Web', (WidgetTester tester) async {
final Completer<InAppWebViewController> controllerCompleter = Completer<InAppWebViewController>();
final Completer<InAppWebViewController> controllerCompleter =
Completer<InAppWebViewController>();
final Completer<String> onCreateWindowCalled = Completer<String>();
await tester.pumpWidget(
Directionality(

View File

@ -16,7 +16,8 @@ void clearAndSetProxyOverride() {
].contains(defaultTargetPlatform);
testWidgets('clear and set proxy override', (WidgetTester tester) async {
final Completer<InAppWebViewController> controllerCompleter = Completer<InAppWebViewController>();
final Completer<InAppWebViewController> controllerCompleter =
Completer<InAppWebViewController>();
final Completer<String> pageLoaded = Completer<String>();
var proxyAvailable =

View File

@ -80,12 +80,13 @@ class ChromeSafariBrowser {
}
var maxLogMessageLength =
ChromeSafariBrowser.debugLoggingSettings.maxLogMessageLength;
String message = "(${defaultTargetPlatform.name}) ChromeSafariBrowser ID " +
id +
" calling \"" +
method.toString() +
"\" using " +
args.toString();
String message =
"(${defaultTargetPlatform.name}) ChromeSafariBrowser ID " +
id +
" calling \"" +
method.toString() +
"\" using " +
args.toString();
if (maxLogMessageLength >= 0 && message.length > maxLogMessageLength) {
message = message.substring(0, maxLogMessageLength) + "...";
}

View File

@ -87,7 +87,6 @@ class CookieManager {
@Deprecated("Use webViewController instead")
InAppWebViewController? iosBelow11WebViewController,
InAppWebViewController? webViewController}) async {
webViewController = webViewController ?? iosBelow11WebViewController;
assert(url.toString().isNotEmpty);
@ -396,7 +395,6 @@ class CookieManager {
@Deprecated("Use webViewController instead")
InAppWebViewController? iosBelow11WebViewController,
InAppWebViewController? webViewController}) async {
assert(url.toString().isNotEmpty);
assert(name.isNotEmpty);
@ -456,7 +454,6 @@ class CookieManager {
@Deprecated("Use webViewController instead")
InAppWebViewController? iosBelow11WebViewController,
InAppWebViewController? webViewController}) async {
assert(url.toString().isNotEmpty);
webViewController = webViewController ?? iosBelow11WebViewController;

View File

@ -59,11 +59,12 @@ class FindInteractionController {
}
var maxLogMessageLength =
FindInteractionController.debugLoggingSettings.maxLogMessageLength;
String message = "(${defaultTargetPlatform.name}) FindInteractionController " +
" calling \"" +
method.toString() +
"\" using " +
args.toString();
String message =
"(${defaultTargetPlatform.name}) FindInteractionController " +
" calling \"" +
method.toString() +
"\" using " +
args.toString();
if (maxLogMessageLength >= 0 && message.length > maxLogMessageLength) {
message = message.substring(0, maxLogMessageLength) + "...";
}

View File

@ -31,7 +31,8 @@ class InAppLocalhostServer {
}) {
this._port = port;
this._directoryIndex = directoryIndex;
this._documentRoot = (documentRoot.endsWith('/')) ? documentRoot : '$documentRoot/';
this._documentRoot =
(documentRoot.endsWith('/')) ? documentRoot : '$documentRoot/';
}
///Starts the server on `http://localhost:[port]/`.

View File

@ -1535,8 +1535,8 @@ class InAppWebViewController {
if (manifestFound) {
try {
Map<String, dynamic> manifest =
json.decode(await manifestResponse!.transform(Utf8Decoder()).join());
Map<String, dynamic> manifest = json
.decode(await manifestResponse!.transform(Utf8Decoder()).join());
if (manifest.containsKey("icons")) {
for (Map<String, dynamic> icon in manifest["icons"]) {
favicons.addAll(_createFavicons(webviewUrl, assetPathBase,

View File

@ -66,11 +66,12 @@ class PullToRefreshController {
}
var maxLogMessageLength =
PullToRefreshController.debugLoggingSettings.maxLogMessageLength;
String message = "(${defaultTargetPlatform.name}) PullToRefreshController " +
" calling \"" +
method.toString() +
"\" using " +
args.toString();
String message =
"(${defaultTargetPlatform.name}) PullToRefreshController " +
" calling \"" +
method.toString() +
"\" using " +
args.toString();
if (maxLogMessageLength >= 0 && message.length > maxLogMessageLength) {
message = message.substring(0, maxLogMessageLength) + "...";
}

View File

@ -120,12 +120,13 @@ class WebAuthenticationSession implements Disposable {
}
var maxLogMessageLength =
WebAuthenticationSession.debugLoggingSettings.maxLogMessageLength;
String message = "(${defaultTargetPlatform.name}) WebAuthenticationSession ID " +
id +
" calling \"" +
method.toString() +
"\" using " +
args.toString();
String message =
"(${defaultTargetPlatform.name}) WebAuthenticationSession ID " +
id +
" calling \"" +
method.toString() +
"\" using " +
args.toString();
if (maxLogMessageLength >= 0 && message.length > maxLogMessageLength) {
message = message.substring(0, maxLogMessageLength) + "...";
}