From 48d8f73b23ebb5afb1706e7bc93a4b2ad0e7f55d Mon Sep 17 00:00:00 2001 From: Lorenzo Pichilli Date: Fri, 14 Oct 2022 01:55:54 +0200 Subject: [PATCH] fixed integration tests, fixed android evaluation javascript with content world --- .../types/UserContentController.java | 22 +++++++++++++------ .../cookie_manager/set_get_delete.dart | 2 +- .../find_interactions.dart | 11 +--------- .../headless_in_app_webview/custom_size.dart | 2 +- .../run_and_dispose.dart | 2 +- .../set_get_settings.dart | 2 +- .../take_screenshot.dart | 2 +- .../load_asset_file.dart | 2 +- .../in_app_webview/clear_cache.dart | 2 +- .../in_app_webview/clear_focus.dart | 2 +- .../in_app_webview/clear_ssl_preferences.dart | 2 +- .../in_app_webview/content_blocker.dart | 2 +- .../in_app_webview/create_pdf.dart | 2 +- .../in_app_webview/get_certificate.dart | 2 +- .../in_app_webview/get_content_height.dart | 2 +- .../in_app_webview/get_favicons.dart | 2 +- .../in_app_webview/get_html.dart | 2 +- .../in_app_webview/get_meta_tags.dart | 2 +- .../in_app_webview/get_meta_theme_color.dart | 2 +- .../in_app_webview/get_original_url.dart | 2 +- .../in_app_webview/get_progress.dart | 2 +- .../in_app_webview/get_title.dart | 2 +- .../http_auth_credential_database.dart | 4 ++-- .../in_app_webview/initial_url_request.dart | 4 ++-- .../in_app_webview/inject_css.dart | 6 ++--- .../inject_javascript_file.dart | 4 ++-- .../intercept_ajax_request.dart | 8 +++---- .../intercept_fetch_request.dart | 8 +++---- .../in_app_webview/is_loading.dart | 2 +- .../in_app_webview/is_secure_context.dart | 2 +- .../javascript_code_evaluation.dart | 8 +++---- .../in_app_webview/javascript_dialogs.dart | 2 +- .../in_app_webview/javascript_handler.dart | 2 +- .../in_app_webview/load_data.dart | 2 +- .../in_app_webview/load_file.dart | 2 +- .../in_app_webview/load_url.dart | 4 ++-- .../in_app_webview/on_console_message.dart | 2 +- .../on_download_start_request.dart | 2 +- .../in_app_webview/on_js_before_unload.dart | 2 +- .../on_load_resource_with_custom_scheme.dart | 2 +- .../on_navigation_response.dart | 4 ++-- .../on_page_commit_visible.dart | 2 +- .../in_app_webview/on_permission_request.dart | 2 +- .../in_app_webview/on_received_icon.dart | 2 +- .../on_received_touch_icon_url.dart | 2 +- .../in_app_webview/on_scroll_changed.dart | 2 +- .../in_app_webview/on_title_changed.dart | 2 +- .../on_update_visited_history.dart | 2 +- .../in_app_webview/page_down_up.dart | 2 +- .../in_app_webview/pause_resume.dart | 2 +- .../in_app_webview/pause_resume_timers.dart | 2 +- .../in_app_webview/post_requests.dart | 6 ++--- .../in_app_webview/print_current_page.dart | 2 +- .../in_app_webview/programmatic_scroll.dart | 4 ++-- .../programmatic_zoom_scale.dart | 8 +++---- .../in_app_webview/pull_to_refresh.dart | 2 +- .../in_app_webview/reload.dart | 4 ++-- .../request_focus_node_href.dart | 2 +- .../in_app_webview/request_image_ref.dart | 2 +- .../in_app_webview/resize_webview.dart | 2 +- .../in_app_webview/set_get_settings.dart | 2 +- .../should_intercept_request.dart | 2 +- .../should_override_url_loading.dart | 8 +++---- .../in_app_webview/ssl_request.dart | 2 +- .../in_app_webview/stop_loading.dart | 2 +- .../in_app_webview/t_rex_runner_game.dart | 2 +- .../in_app_webview/take_screenshot.dart | 2 +- .../in_app_webview/user_scripts.dart | 4 ++-- .../in_app_webview/web_archive.dart | 4 ++-- .../in_app_webview/web_history.dart | 6 ++--- .../in_app_webview/web_message.dart | 4 ++-- .../in_app_webview/webview_windows.dart | 12 +++++----- .../clear_and_set_proxy_override.dart | 2 +- .../ios/Flutter/flutter_export_environment.sh | 5 ++--- lib/src/debug_logging_settings.dart | 3 --- 75 files changed, 125 insertions(+), 130 deletions(-) diff --git a/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/types/UserContentController.java b/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/types/UserContentController.java index 8e79652d..9218b355 100644 --- a/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/types/UserContentController.java +++ b/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/types/UserContentController.java @@ -25,6 +25,8 @@ import java.util.List; import java.util.Map; import java.util.Set; +import io.flutter.Log; + @SuppressLint("RestrictedApi") public class UserContentController implements Disposable { protected static final String LOG_TAG = "UserContentController"; @@ -139,13 +141,17 @@ public class UserContentController implements Disposable { if (!contentWorlds.contains(contentWorld)) { contentWorlds.add(contentWorld); + StringBuilder pluginScriptsSource = new StringBuilder(); LinkedHashSet pluginScriptsRequired = this.getPluginScriptsRequiredInAllContentWorlds(); for (PluginScript script : pluginScriptsRequired) { - sourceWrapped.append(";").append(script.getSource()); + pluginScriptsSource.append(script.getSource()); } + String contentWorldCreatorCode = CONTENT_WORLDS_GENERATOR_JS_SOURCE + .replace(PluginScriptsUtil.VAR_CONTENT_WORLD_NAME_ARRAY, "'" + escapeContentWorldName(contentWorld.getName()) + "'") + .replace(PluginScriptsUtil.VAR_JSON_SOURCE_ENCODED, escapeCode(pluginScriptsSource.toString())); + sourceWrapped.append(contentWorldCreatorCode).append(";"); } - sourceWrapped.append(source); - return wrapSourceCodeInContentWorld(contentWorld, sourceWrapped.toString()); + return sourceWrapped.append(wrapSourceCodeInContentWorld(contentWorld, source)).toString(); } return source; } @@ -421,10 +427,12 @@ public class UserContentController implements Disposable { " iframe.style = 'display: none; z-index: 0; position: absolute; width: 0px; height: 0px';" + " document.body.append(iframe);" + " }" + - " var script = iframe.contentWindow.document.createElement('script');" + - " script.id = '" + JavaScriptBridgeJS.JAVASCRIPT_BRIDGE_NAME + "_plugin_scripts';" + - " script.innerHTML = " + PluginScriptsUtil.VAR_JSON_SOURCE_ENCODED + ";" + - " iframe.contentWindow.document.body.append(script);" + + " if (iframe.contentWindow.document.getElementById('" + JavaScriptBridgeJS.JAVASCRIPT_BRIDGE_NAME + "_plugin_scripts') == null) {" + + " var script = iframe.contentWindow.document.createElement('script');" + + " script.id = '" + JavaScriptBridgeJS.JAVASCRIPT_BRIDGE_NAME + "_plugin_scripts';" + + " script.innerHTML = " + PluginScriptsUtil.VAR_JSON_SOURCE_ENCODED + ";" + + " iframe.contentWindow.document.body.append(script);" + + " }" + " }" + " clearInterval(interval);" + " });" + diff --git a/example/integration_test/cookie_manager/set_get_delete.dart b/example/integration_test/cookie_manager/set_get_delete.dart index c9b1dce3..463c3082 100644 --- a/example/integration_test/cookie_manager/set_get_delete.dart +++ b/example/integration_test/cookie_manager/set_get_delete.dart @@ -18,7 +18,7 @@ void setGetDelete() { testWidgets('set, get, delete', (WidgetTester tester) async { CookieManager cookieManager = CookieManager.instance(); - final Completer controllerCompleter = Completer(); + final Completer controllerCompleter = Completer(); final Completer pageLoaded = Completer(); await tester.pumpWidget( Directionality( diff --git a/example/integration_test/find_interaction_controller/find_interactions.dart b/example/integration_test/find_interaction_controller/find_interactions.dart index 147bc4a1..e0a4470c 100644 --- a/example/integration_test/find_interaction_controller/find_interactions.dart +++ b/example/integration_test/find_interaction_controller/find_interactions.dart @@ -15,7 +15,6 @@ void findInteractions() { ].contains(defaultTargetPlatform); testWidgets('find interactions', (WidgetTester tester) async { - final Completer controllerCompleter = Completer(); final Completer pageLoaded = Completer(); final findInteractionController = FindInteractionController(); @@ -28,9 +27,6 @@ void findInteractions() { findInteractionController: findInteractionController, initialSettings: InAppWebViewSettings( clearCache: true, isFindInteractionEnabled: true), - onWebViewCreated: (controller) { - controllerCompleter.complete(controller); - }, onLoadStop: (controller, url) { pageLoaded.complete(); }, @@ -77,7 +73,6 @@ void findInteractions() { }, skip: shouldSkip); testWidgets('onFindResultReceived', (WidgetTester tester) async { - final Completer controllerCompleter = Completer(); final Completer pageLoaded = Completer(); final Completer numberOfMatchesCompleter = Completer(); final findInteractionController = FindInteractionController( @@ -98,9 +93,6 @@ void findInteractions() { initialSettings: InAppWebViewSettings( clearCache: true, isFindInteractionEnabled: false), findInteractionController: findInteractionController, - onWebViewCreated: (controller) { - controllerCompleter.complete(controller); - }, onLoadStop: (controller, url) { pageLoaded.complete(); }, @@ -108,13 +100,12 @@ void findInteractions() { ), ); - var controller = await controllerCompleter.future; await pageLoaded.future; await tester.pump(); await Future.delayed(Duration(seconds: 1)); - await controller.findAll(find: "InAppWebViewInitialFileTest"); + await findInteractionController.findAll(find: "InAppWebViewInitialFileTest"); final int numberOfMatches = await numberOfMatchesCompleter.future; expect(numberOfMatches, 2); final session = await findInteractionController.getActiveFindSession(); diff --git a/example/integration_test/headless_in_app_webview/custom_size.dart b/example/integration_test/headless_in_app_webview/custom_size.dart index 566fcc00..db87f671 100644 --- a/example/integration_test/headless_in_app_webview/custom_size.dart +++ b/example/integration_test/headless_in_app_webview/custom_size.dart @@ -17,7 +17,7 @@ void customSize() { ].contains(defaultTargetPlatform); test('set and get custom size', () async { - final Completer controllerCompleter = Completer(); + final Completer controllerCompleter = Completer(); var headlessWebView = new HeadlessInAppWebView( initialUrlRequest: URLRequest(url: TEST_CROSS_PLATFORM_URL_1), diff --git a/example/integration_test/headless_in_app_webview/run_and_dispose.dart b/example/integration_test/headless_in_app_webview/run_and_dispose.dart index 16342917..de7fad0c 100644 --- a/example/integration_test/headless_in_app_webview/run_and_dispose.dart +++ b/example/integration_test/headless_in_app_webview/run_and_dispose.dart @@ -16,7 +16,7 @@ void runAndDispose() { ].contains(defaultTargetPlatform); test('run and dispose', () async { - final Completer controllerCompleter = Completer(); + final Completer controllerCompleter = Completer(); final Completer pageLoaded = Completer(); var headlessWebView = new HeadlessInAppWebView( diff --git a/example/integration_test/headless_in_app_webview/set_get_settings.dart b/example/integration_test/headless_in_app_webview/set_get_settings.dart index 866f2f57..fa5874d1 100644 --- a/example/integration_test/headless_in_app_webview/set_get_settings.dart +++ b/example/integration_test/headless_in_app_webview/set_get_settings.dart @@ -16,7 +16,7 @@ void setGetSettings() { ].contains(defaultTargetPlatform); test('set/get settings', () async { - final Completer controllerCompleter = Completer(); + final Completer controllerCompleter = Completer(); final Completer pageLoaded = Completer(); var headlessWebView = new HeadlessInAppWebView( diff --git a/example/integration_test/headless_in_app_webview/take_screenshot.dart b/example/integration_test/headless_in_app_webview/take_screenshot.dart index 9ba73aee..91c4e6be 100644 --- a/example/integration_test/headless_in_app_webview/take_screenshot.dart +++ b/example/integration_test/headless_in_app_webview/take_screenshot.dart @@ -16,7 +16,7 @@ void takeScreenshot() { ].contains(defaultTargetPlatform); test('take screenshot', () async { - final Completer controllerCompleter = Completer(); + final Completer controllerCompleter = Completer(); final Completer pageLoaded = Completer(); var headlessWebView = new HeadlessInAppWebView( diff --git a/example/integration_test/in_app_localhost_server/load_asset_file.dart b/example/integration_test/in_app_localhost_server/load_asset_file.dart index fe5ffa64..9f8ca33d 100644 --- a/example/integration_test/in_app_localhost_server/load_asset_file.dart +++ b/example/integration_test/in_app_localhost_server/load_asset_file.dart @@ -17,7 +17,7 @@ void loadAssetFile(InAppLocalhostServer localhostServer) { testWidgets('load asset file', (WidgetTester tester) async { expect(localhostServer.isRunning(), true); - final Completer controllerCompleter = Completer(); + final Completer controllerCompleter = Completer(); await tester.pumpWidget( Directionality( textDirection: TextDirection.ltr, diff --git a/example/integration_test/in_app_webview/clear_cache.dart b/example/integration_test/in_app_webview/clear_cache.dart index b0686bc7..567aafb1 100644 --- a/example/integration_test/in_app_webview/clear_cache.dart +++ b/example/integration_test/in_app_webview/clear_cache.dart @@ -17,7 +17,7 @@ void clearCache() { ].contains(defaultTargetPlatform); testWidgets('clearCache', (WidgetTester tester) async { - final Completer controllerCompleter = Completer(); + final Completer controllerCompleter = Completer(); final Completer pageLoaded = Completer(); await tester.pumpWidget( diff --git a/example/integration_test/in_app_webview/clear_focus.dart b/example/integration_test/in_app_webview/clear_focus.dart index b511de72..d3e07c2b 100644 --- a/example/integration_test/in_app_webview/clear_focus.dart +++ b/example/integration_test/in_app_webview/clear_focus.dart @@ -17,7 +17,7 @@ void clearFocus() { ].contains(defaultTargetPlatform); testWidgets('clearFocus', (WidgetTester tester) async { - final Completer controllerCompleter = Completer(); + final Completer controllerCompleter = Completer(); final Completer pageLoaded = Completer(); await tester.pumpWidget( diff --git a/example/integration_test/in_app_webview/clear_ssl_preferences.dart b/example/integration_test/in_app_webview/clear_ssl_preferences.dart index c72efc2a..b83558b1 100644 --- a/example/integration_test/in_app_webview/clear_ssl_preferences.dart +++ b/example/integration_test/in_app_webview/clear_ssl_preferences.dart @@ -15,7 +15,7 @@ void clearSslPreferences() { ].contains(defaultTargetPlatform); testWidgets('clearSslPreferences', (WidgetTester tester) async { - final Completer controllerCompleter = Completer(); + final Completer controllerCompleter = Completer(); final Completer pageLoaded = Completer(); await tester.pumpWidget( diff --git a/example/integration_test/in_app_webview/content_blocker.dart b/example/integration_test/in_app_webview/content_blocker.dart index 827765d0..c86b9c84 100644 --- a/example/integration_test/in_app_webview/content_blocker.dart +++ b/example/integration_test/in_app_webview/content_blocker.dart @@ -17,7 +17,7 @@ void contentBlocker() { ].contains(defaultTargetPlatform); testWidgets('Content Blocker', (WidgetTester tester) async { - final Completer controllerCompleter = Completer(); + final Completer controllerCompleter = Completer(); final Completer pageLoaded = Completer(); await tester.pumpWidget( Directionality( diff --git a/example/integration_test/in_app_webview/create_pdf.dart b/example/integration_test/in_app_webview/create_pdf.dart index 37fc06b6..41941771 100644 --- a/example/integration_test/in_app_webview/create_pdf.dart +++ b/example/integration_test/in_app_webview/create_pdf.dart @@ -16,7 +16,7 @@ void createPdf() { ].contains(defaultTargetPlatform); testWidgets('createPdf', (WidgetTester tester) async { - final Completer controllerCompleter = Completer(); + final Completer controllerCompleter = Completer(); final Completer pageLoaded = Completer(); await tester.pumpWidget( diff --git a/example/integration_test/in_app_webview/get_certificate.dart b/example/integration_test/in_app_webview/get_certificate.dart index e256a85a..b51b8473 100644 --- a/example/integration_test/in_app_webview/get_certificate.dart +++ b/example/integration_test/in_app_webview/get_certificate.dart @@ -17,7 +17,7 @@ void getCertificate() { ].contains(defaultTargetPlatform); testWidgets('getCertificate', (WidgetTester tester) async { - final Completer controllerCompleter = Completer(); + final Completer controllerCompleter = Completer(); final Completer pageLoaded = Completer(); await tester.pumpWidget( diff --git a/example/integration_test/in_app_webview/get_content_height.dart b/example/integration_test/in_app_webview/get_content_height.dart index 60ea1f02..b8dcce91 100644 --- a/example/integration_test/in_app_webview/get_content_height.dart +++ b/example/integration_test/in_app_webview/get_content_height.dart @@ -19,7 +19,7 @@ void getContentHeight() { var url = !kIsWeb ? TEST_CROSS_PLATFORM_URL_1 : TEST_WEB_PLATFORM_URL_1; testWidgets('getContentHeight', (WidgetTester tester) async { - final Completer controllerCompleter = Completer(); + final Completer controllerCompleter = Completer(); final Completer pageLoaded = Completer(); await tester.pumpWidget( diff --git a/example/integration_test/in_app_webview/get_favicons.dart b/example/integration_test/in_app_webview/get_favicons.dart index e8626730..4f973904 100644 --- a/example/integration_test/in_app_webview/get_favicons.dart +++ b/example/integration_test/in_app_webview/get_favicons.dart @@ -19,7 +19,7 @@ void getFavicons() { var url = !kIsWeb ? TEST_CROSS_PLATFORM_URL_1 : TEST_WEB_PLATFORM_URL_1; testWidgets('getFavicons', (WidgetTester tester) async { - final Completer controllerCompleter = Completer(); + final Completer controllerCompleter = Completer(); final Completer pageLoaded = Completer(); await tester.pumpWidget( diff --git a/example/integration_test/in_app_webview/get_html.dart b/example/integration_test/in_app_webview/get_html.dart index c69f6a70..8fe67317 100644 --- a/example/integration_test/in_app_webview/get_html.dart +++ b/example/integration_test/in_app_webview/get_html.dart @@ -19,7 +19,7 @@ void getHtml() { var url = !kIsWeb ? TEST_CROSS_PLATFORM_URL_1 : TEST_WEB_PLATFORM_URL_1; testWidgets('getHtml', (WidgetTester tester) async { - final Completer controllerCompleter = Completer(); + final Completer controllerCompleter = Completer(); final Completer pageLoaded = Completer(); await tester.pumpWidget( diff --git a/example/integration_test/in_app_webview/get_meta_tags.dart b/example/integration_test/in_app_webview/get_meta_tags.dart index a13bd1d2..d574625f 100644 --- a/example/integration_test/in_app_webview/get_meta_tags.dart +++ b/example/integration_test/in_app_webview/get_meta_tags.dart @@ -19,7 +19,7 @@ void getMetaTags() { var url = !kIsWeb ? TEST_CROSS_PLATFORM_URL_1 : TEST_WEB_PLATFORM_URL_1; testWidgets('getMetaTags', (WidgetTester tester) async { - final Completer controllerCompleter = Completer(); + final Completer controllerCompleter = Completer(); final Completer pageLoaded = Completer(); await tester.pumpWidget( diff --git a/example/integration_test/in_app_webview/get_meta_theme_color.dart b/example/integration_test/in_app_webview/get_meta_theme_color.dart index 71f5fa99..0827678d 100644 --- a/example/integration_test/in_app_webview/get_meta_theme_color.dart +++ b/example/integration_test/in_app_webview/get_meta_theme_color.dart @@ -19,7 +19,7 @@ void getMetaThemeColor() { var url = !kIsWeb ? TEST_URL_1 : TEST_WEB_PLATFORM_URL_1; testWidgets('getMetaThemeColor', (WidgetTester tester) async { - final Completer controllerCompleter = Completer(); + final Completer controllerCompleter = Completer(); final Completer pageLoaded = Completer(); await tester.pumpWidget( diff --git a/example/integration_test/in_app_webview/get_original_url.dart b/example/integration_test/in_app_webview/get_original_url.dart index 5a1ef667..d2d34bc0 100644 --- a/example/integration_test/in_app_webview/get_original_url.dart +++ b/example/integration_test/in_app_webview/get_original_url.dart @@ -19,7 +19,7 @@ void getOriginalUrl() { var url = !kIsWeb ? TEST_URL_1 : TEST_WEB_PLATFORM_URL_1; testWidgets('getOriginalUrl', (WidgetTester tester) async { - final Completer controllerCompleter = Completer(); + final Completer controllerCompleter = Completer(); final Completer pageLoaded = Completer(); await tester.pumpWidget( diff --git a/example/integration_test/in_app_webview/get_progress.dart b/example/integration_test/in_app_webview/get_progress.dart index 9ebd33cb..58a6b283 100644 --- a/example/integration_test/in_app_webview/get_progress.dart +++ b/example/integration_test/in_app_webview/get_progress.dart @@ -17,7 +17,7 @@ void getProgress() { ].contains(defaultTargetPlatform); testWidgets('getProgress', (WidgetTester tester) async { - final Completer controllerCompleter = Completer(); + final Completer controllerCompleter = Completer(); final Completer pageLoaded = Completer(); await tester.pumpWidget( diff --git a/example/integration_test/in_app_webview/get_title.dart b/example/integration_test/in_app_webview/get_title.dart index 427c5ab0..37597201 100644 --- a/example/integration_test/in_app_webview/get_title.dart +++ b/example/integration_test/in_app_webview/get_title.dart @@ -36,7 +36,7 @@ void getTitle() { testWidgets('getTitle', (WidgetTester tester) async { final Completer pageStarted = Completer(); final Completer pageLoaded = Completer(); - final Completer controllerCompleter = Completer(); + final Completer controllerCompleter = Completer(); await tester.pumpWidget( Directionality( diff --git a/example/integration_test/in_app_webview/http_auth_credential_database.dart b/example/integration_test/in_app_webview/http_auth_credential_database.dart index 13854e14..757a229f 100644 --- a/example/integration_test/in_app_webview/http_auth_credential_database.dart +++ b/example/integration_test/in_app_webview/http_auth_credential_database.dart @@ -20,7 +20,7 @@ void httpAuthCredentialDatabase() { testWidgets('use saved credentials', (WidgetTester tester) async { HttpAuthCredentialDatabase httpAuthCredentialDatabase = HttpAuthCredentialDatabase.instance(); - final Completer controllerCompleter = Completer(); + final Completer controllerCompleter = Completer(); final Completer pageLoaded = Completer(); httpAuthCredentialDatabase.setHttpAuthCredential( @@ -84,7 +84,7 @@ void httpAuthCredentialDatabase() { }); testWidgets('save credentials', (WidgetTester tester) async { - final Completer controllerCompleter = Completer(); + final Completer controllerCompleter = Completer(); final Completer pageLoaded = Completer(); await tester.pumpWidget( diff --git a/example/integration_test/in_app_webview/initial_url_request.dart b/example/integration_test/in_app_webview/initial_url_request.dart index d7c976bf..d7714eac 100644 --- a/example/integration_test/in_app_webview/initial_url_request.dart +++ b/example/integration_test/in_app_webview/initial_url_request.dart @@ -27,7 +27,7 @@ void initialUrlRequest() { testWidgets('launches with allowsBackForwardNavigationGestures true', (WidgetTester tester) async { final Completer pageLoaded = Completer(); - final Completer controllerCompleter = Completer(); + final Completer controllerCompleter = Completer(); await tester.pumpWidget( Directionality( @@ -67,7 +67,7 @@ void initialUrlRequest() { testWidgets('basic', (WidgetTester tester) async { final Completer pageLoaded = Completer(); - final Completer controllerCompleter = Completer(); + final Completer controllerCompleter = Completer(); await tester.pumpWidget( Directionality( diff --git a/example/integration_test/in_app_webview/inject_css.dart b/example/integration_test/in_app_webview/inject_css.dart index e2831919..24df3263 100644 --- a/example/integration_test/in_app_webview/inject_css.dart +++ b/example/integration_test/in_app_webview/inject_css.dart @@ -20,7 +20,7 @@ void injectCSS() { group('inject CSS', () { testWidgets('code', (WidgetTester tester) async { - final Completer controllerCompleter = Completer(); + final Completer controllerCompleter = Completer(); final Completer pageLoaded = Completer(); await tester.pumpWidget( @@ -58,7 +58,7 @@ void injectCSS() { }); testWidgets('file from url', (WidgetTester tester) async { - final Completer controllerCompleter = Completer(); + final Completer controllerCompleter = Completer(); final Completer pageLoaded = Completer(); await tester.pumpWidget( @@ -93,7 +93,7 @@ void injectCSS() { }); testWidgets('file from asset', (WidgetTester tester) async { - final Completer controllerCompleter = Completer(); + final Completer controllerCompleter = Completer(); final Completer pageLoaded = Completer(); await tester.pumpWidget( diff --git a/example/integration_test/in_app_webview/inject_javascript_file.dart b/example/integration_test/in_app_webview/inject_javascript_file.dart index a94a25ba..1a05a752 100644 --- a/example/integration_test/in_app_webview/inject_javascript_file.dart +++ b/example/integration_test/in_app_webview/inject_javascript_file.dart @@ -20,7 +20,7 @@ void injectJavascriptFile() { group('inject javascript file', () { testWidgets('from url', (WidgetTester tester) async { - final Completer controllerCompleter = Completer(); + final Completer controllerCompleter = Completer(); final Completer pageLoaded = Completer(); final Completer jQueryLoaded = Completer(); final Completer jQueryLoadError = Completer(); @@ -82,7 +82,7 @@ void injectJavascriptFile() { }); testWidgets('from asset', (WidgetTester tester) async { - final Completer controllerCompleter = Completer(); + final Completer controllerCompleter = Completer(); final Completer pageLoaded = Completer(); await tester.pumpWidget( diff --git a/example/integration_test/in_app_webview/intercept_ajax_request.dart b/example/integration_test/in_app_webview/intercept_ajax_request.dart index 3cac35e0..08779592 100644 --- a/example/integration_test/in_app_webview/intercept_ajax_request.dart +++ b/example/integration_test/in_app_webview/intercept_ajax_request.dart @@ -19,7 +19,7 @@ void interceptAjaxRequest() { group('intercept ajax request', () { testWidgets('send string data', (WidgetTester tester) async { - final Completer controllerCompleter = Completer(); + final Completer controllerCompleter = Completer(); final Completer shouldInterceptAjaxPostRequestCompleter = Completer(); final Completer> onAjaxReadyStateChangeCompleter = @@ -104,7 +104,7 @@ void interceptAjaxRequest() { }); testWidgets('send json data', (WidgetTester tester) async { - final Completer controllerCompleter = Completer(); + final Completer controllerCompleter = Completer(); final Completer shouldInterceptAjaxPostRequestCompleter = Completer(); final Completer> onAjaxReadyStateChangeCompleter = @@ -195,7 +195,7 @@ void interceptAjaxRequest() { }); testWidgets('send URLSearchParams data', (WidgetTester tester) async { - final Completer controllerCompleter = Completer(); + final Completer controllerCompleter = Completer(); final Completer shouldInterceptAjaxPostRequestCompleter = Completer(); final Completer> onAjaxReadyStateChangeCompleter = @@ -282,7 +282,7 @@ void interceptAjaxRequest() { }); testWidgets('send FormData', (WidgetTester tester) async { - final Completer controllerCompleter = Completer(); + final Completer controllerCompleter = Completer(); final Completer shouldInterceptAjaxPostRequestCompleter = Completer(); final Completer> onAjaxReadyStateChangeCompleter = diff --git a/example/integration_test/in_app_webview/intercept_fetch_request.dart b/example/integration_test/in_app_webview/intercept_fetch_request.dart index baf8d483..4967e645 100644 --- a/example/integration_test/in_app_webview/intercept_fetch_request.dart +++ b/example/integration_test/in_app_webview/intercept_fetch_request.dart @@ -19,7 +19,7 @@ void interceptFetchRequest() { group('intercept fetch request', () { testWidgets('send string data', (WidgetTester tester) async { - final Completer controllerCompleter = Completer(); + final Completer controllerCompleter = Completer(); final Completer> fetchPostCompleter = Completer>(); final Completer shouldInterceptFetchPostRequestCompleter = @@ -97,7 +97,7 @@ void interceptFetchRequest() { }); testWidgets('send json data', (WidgetTester tester) async { - final Completer controllerCompleter = Completer(); + final Completer controllerCompleter = Completer(); final Completer> fetchPostCompleter = Completer>(); final Completer shouldInterceptFetchPostRequestCompleter = @@ -181,7 +181,7 @@ void interceptFetchRequest() { }); testWidgets('send URLSearchParams data', (WidgetTester tester) async { - final Completer controllerCompleter = Completer(); + final Completer controllerCompleter = Completer(); final Completer> fetchPostCompleter = Completer>(); final Completer shouldInterceptFetchPostRequestCompleter = @@ -261,7 +261,7 @@ void interceptFetchRequest() { }); testWidgets('send FormData', (WidgetTester tester) async { - final Completer controllerCompleter = Completer(); + final Completer controllerCompleter = Completer(); final Completer> fetchPostCompleter = Completer>(); final Completer shouldInterceptFetchPostRequestCompleter = diff --git a/example/integration_test/in_app_webview/is_loading.dart b/example/integration_test/in_app_webview/is_loading.dart index 2dbe9cf9..3c90d8a5 100644 --- a/example/integration_test/in_app_webview/is_loading.dart +++ b/example/integration_test/in_app_webview/is_loading.dart @@ -17,7 +17,7 @@ void isLoading() { ].contains(defaultTargetPlatform); testWidgets('isLoading', (WidgetTester tester) async { - final Completer controllerCompleter = Completer(); + final Completer controllerCompleter = Completer(); final Completer pageStarted = Completer(); final Completer pageLoaded = Completer(); diff --git a/example/integration_test/in_app_webview/is_secure_context.dart b/example/integration_test/in_app_webview/is_secure_context.dart index 7a3464c3..30ff30b2 100644 --- a/example/integration_test/in_app_webview/is_secure_context.dart +++ b/example/integration_test/in_app_webview/is_secure_context.dart @@ -19,7 +19,7 @@ void isSecureContext() { var url = !kIsWeb ? TEST_CROSS_PLATFORM_URL_1 : TEST_WEB_PLATFORM_URL_1; testWidgets('isSecureContext', (WidgetTester tester) async { - final Completer controllerCompleter = Completer(); + final Completer controllerCompleter = Completer(); final StreamController pageLoads = StreamController.broadcast(); diff --git a/example/integration_test/in_app_webview/javascript_code_evaluation.dart b/example/integration_test/in_app_webview/javascript_code_evaluation.dart index b05f48d5..9c134982 100644 --- a/example/integration_test/in_app_webview/javascript_code_evaluation.dart +++ b/example/integration_test/in_app_webview/javascript_code_evaluation.dart @@ -26,7 +26,7 @@ void javascriptCodeEvaluation() { ].contains(defaultTargetPlatform); testWidgets('evaluateJavascript', (WidgetTester tester) async { - final Completer controllerCompleter = Completer(); + final Completer controllerCompleter = Completer(); final Completer pageLoaded = Completer(); await tester.pumpWidget( @@ -69,7 +69,7 @@ void javascriptCodeEvaluation() { testWidgets('evaluateJavascript with content world', (WidgetTester tester) async { - final Completer controllerCompleter = Completer(); + final Completer controllerCompleter = Completer(); final Completer pageLoaded = Completer(); await tester.pumpWidget( @@ -112,7 +112,7 @@ void javascriptCodeEvaluation() { ].contains(defaultTargetPlatform); testWidgets('callAsyncJavaScript', (WidgetTester tester) async { - final Completer controllerCompleter = Completer(); + final Completer controllerCompleter = Completer(); final Completer pageLoaded = Completer(); await tester.pumpWidget( @@ -173,7 +173,7 @@ void javascriptCodeEvaluation() { testWidgets('callAsyncJavaScript with content world', (WidgetTester tester) async { - final Completer controllerCompleter = Completer(); + final Completer controllerCompleter = Completer(); final Completer pageLoaded = Completer(); await tester.pumpWidget( diff --git a/example/integration_test/in_app_webview/javascript_dialogs.dart b/example/integration_test/in_app_webview/javascript_dialogs.dart index 5c7ba4eb..1cd2aa5d 100644 --- a/example/integration_test/in_app_webview/javascript_dialogs.dart +++ b/example/integration_test/in_app_webview/javascript_dialogs.dart @@ -15,7 +15,7 @@ void javascriptDialogs() { ].contains(defaultTargetPlatform); testWidgets('javascript dialogs', (WidgetTester tester) async { - final Completer controllerCompleter = Completer(); + final Completer controllerCompleter = Completer(); final Completer pageLoaded = Completer(); final Completer alertCompleter = Completer(); diff --git a/example/integration_test/in_app_webview/javascript_handler.dart b/example/integration_test/in_app_webview/javascript_handler.dart index d73476eb..9aa2ce45 100644 --- a/example/integration_test/in_app_webview/javascript_handler.dart +++ b/example/integration_test/in_app_webview/javascript_handler.dart @@ -17,7 +17,7 @@ void javascriptHandler() { ].contains(defaultTargetPlatform); testWidgets('JavaScript Handler', (WidgetTester tester) async { - final Completer controllerCompleter = Completer(); + final Completer controllerCompleter = Completer(); final Completer pageStarted = Completer(); final Completer pageLoaded = Completer(); final Completer handlerFoo = Completer(); diff --git a/example/integration_test/in_app_webview/load_data.dart b/example/integration_test/in_app_webview/load_data.dart index d8e11013..f271084e 100644 --- a/example/integration_test/in_app_webview/load_data.dart +++ b/example/integration_test/in_app_webview/load_data.dart @@ -17,7 +17,7 @@ void loadData() { ].contains(defaultTargetPlatform); testWidgets('loadData', (WidgetTester tester) async { - final Completer controllerCompleter = Completer(); + final Completer controllerCompleter = Completer(); final StreamController pageLoads = StreamController.broadcast(); diff --git a/example/integration_test/in_app_webview/load_file.dart b/example/integration_test/in_app_webview/load_file.dart index 25ca0b00..97c77113 100644 --- a/example/integration_test/in_app_webview/load_file.dart +++ b/example/integration_test/in_app_webview/load_file.dart @@ -17,7 +17,7 @@ void loadFile() { ].contains(defaultTargetPlatform); testWidgets('loadFile', (WidgetTester tester) async { - final Completer controllerCompleter = Completer(); + final Completer controllerCompleter = Completer(); final StreamController pageLoads = StreamController.broadcast(); diff --git a/example/integration_test/in_app_webview/load_url.dart b/example/integration_test/in_app_webview/load_url.dart index bae9eccc..6bd64d7c 100644 --- a/example/integration_test/in_app_webview/load_url.dart +++ b/example/integration_test/in_app_webview/load_url.dart @@ -20,7 +20,7 @@ void loadUrl() { var initialUrl = !kIsWeb ? TEST_URL_1 : TEST_WEB_PLATFORM_URL_1; testWidgets('loadUrl', (WidgetTester tester) async { - final Completer controllerCompleter = Completer(); + final Completer controllerCompleter = Completer(); final Completer firstUrlLoad = Completer(); final Completer loadedUrl = Completer(); @@ -61,7 +61,7 @@ void loadUrl() { ].contains(defaultTargetPlatform); testWidgets('loadSimulatedRequest', (WidgetTester tester) async { - final Completer controllerCompleter = Completer(); + final Completer controllerCompleter = Completer(); final Completer firstUrlLoad = Completer(); final Completer loadedUrl = Completer(); diff --git a/example/integration_test/in_app_webview/on_console_message.dart b/example/integration_test/in_app_webview/on_console_message.dart index b9a71605..67d3bf46 100644 --- a/example/integration_test/in_app_webview/on_console_message.dart +++ b/example/integration_test/in_app_webview/on_console_message.dart @@ -17,7 +17,7 @@ void onConsoleMessage() { ].contains(defaultTargetPlatform); testWidgets('onConsoleMessage', (WidgetTester tester) async { - final Completer controllerCompleter = Completer(); + final Completer controllerCompleter = Completer(); final Completer onConsoleMessageCompleter = Completer(); await tester.pumpWidget( diff --git a/example/integration_test/in_app_webview/on_download_start_request.dart b/example/integration_test/in_app_webview/on_download_start_request.dart index 20046cbc..3816f216 100644 --- a/example/integration_test/in_app_webview/on_download_start_request.dart +++ b/example/integration_test/in_app_webview/on_download_start_request.dart @@ -17,7 +17,7 @@ void onDownloadStartRequest() { ].contains(defaultTargetPlatform); testWidgets('onDownloadStartRequest', (WidgetTester tester) async { - final Completer controllerCompleter = Completer(); + final Completer controllerCompleter = Completer(); final Completer onDownloadStartCompleter = Completer(); await tester.pumpWidget( Directionality( diff --git a/example/integration_test/in_app_webview/on_js_before_unload.dart b/example/integration_test/in_app_webview/on_js_before_unload.dart index 09a6c3d8..c6f9e965 100644 --- a/example/integration_test/in_app_webview/on_js_before_unload.dart +++ b/example/integration_test/in_app_webview/on_js_before_unload.dart @@ -13,7 +13,7 @@ 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 controllerCompleter = Completer(); + final Completer controllerCompleter = Completer(); final Completer onJsBeforeUnloadCompleter = Completer(); await tester.pumpWidget( diff --git a/example/integration_test/in_app_webview/on_load_resource_with_custom_scheme.dart b/example/integration_test/in_app_webview/on_load_resource_with_custom_scheme.dart index 827f23c6..0e855709 100644 --- a/example/integration_test/in_app_webview/on_load_resource_with_custom_scheme.dart +++ b/example/integration_test/in_app_webview/on_load_resource_with_custom_scheme.dart @@ -16,7 +16,7 @@ void onLoadResourceWithCustomScheme() { ].contains(defaultTargetPlatform); testWidgets('onLoadResourceWithCustomScheme', (WidgetTester tester) async { - final Completer controllerCompleter = Completer(); + final Completer controllerCompleter = Completer(); final Completer imageLoaded = Completer(); await tester.pumpWidget( diff --git a/example/integration_test/in_app_webview/on_navigation_response.dart b/example/integration_test/in_app_webview/on_navigation_response.dart index 47db1b53..be845df3 100644 --- a/example/integration_test/in_app_webview/on_navigation_response.dart +++ b/example/integration_test/in_app_webview/on_navigation_response.dart @@ -17,7 +17,7 @@ void onNavigationResponse() { group("onNavigationResponse", () { testWidgets('allow navigation', (WidgetTester tester) async { - final Completer controllerCompleter = Completer(); + final Completer controllerCompleter = Completer(); final Completer pageLoaded = Completer(); final Completer onNavigationResponseCompleter = Completer(); @@ -51,7 +51,7 @@ void onNavigationResponse() { }); testWidgets('cancel navigation', (WidgetTester tester) async { - final Completer controllerCompleter = Completer(); + final Completer controllerCompleter = Completer(); final Completer pageLoaded = Completer(); final Completer onNavigationResponseCompleter = Completer(); diff --git a/example/integration_test/in_app_webview/on_page_commit_visible.dart b/example/integration_test/in_app_webview/on_page_commit_visible.dart index 716cb183..c91fc973 100644 --- a/example/integration_test/in_app_webview/on_page_commit_visible.dart +++ b/example/integration_test/in_app_webview/on_page_commit_visible.dart @@ -17,7 +17,7 @@ void onPageCommitVisible() { ].contains(defaultTargetPlatform); testWidgets('onPageCommitVisible', (WidgetTester tester) async { - final Completer controllerCompleter = Completer(); + final Completer controllerCompleter = Completer(); final Completer onPageCommitVisibleCompleter = Completer(); await tester.pumpWidget( diff --git a/example/integration_test/in_app_webview/on_permission_request.dart b/example/integration_test/in_app_webview/on_permission_request.dart index 1175d1dc..0b9c0686 100644 --- a/example/integration_test/in_app_webview/on_permission_request.dart +++ b/example/integration_test/in_app_webview/on_permission_request.dart @@ -20,7 +20,7 @@ void onPermissionRequest() { expectedValue = [PermissionResourceType.CAMERA]; testWidgets('onPermissionRequest', (WidgetTester tester) async { - final Completer controllerCompleter = Completer(); + final Completer controllerCompleter = Completer(); final Completer pageLoaded = Completer(); final Completer> onPermissionRequestCompleter = Completer>(); diff --git a/example/integration_test/in_app_webview/on_received_icon.dart b/example/integration_test/in_app_webview/on_received_icon.dart index 109851ac..9cd1ae8e 100644 --- a/example/integration_test/in_app_webview/on_received_icon.dart +++ b/example/integration_test/in_app_webview/on_received_icon.dart @@ -15,7 +15,7 @@ void onReceivedIcon() { ].contains(defaultTargetPlatform); testWidgets('onReceivedIcon', (WidgetTester tester) async { - final Completer controllerCompleter = Completer(); + final Completer controllerCompleter = Completer(); final Completer pageLoaded = Completer(); final Completer onReceivedIconCompleter = Completer(); diff --git a/example/integration_test/in_app_webview/on_received_touch_icon_url.dart b/example/integration_test/in_app_webview/on_received_touch_icon_url.dart index e146c674..350e6f7b 100644 --- a/example/integration_test/in_app_webview/on_received_touch_icon_url.dart +++ b/example/integration_test/in_app_webview/on_received_touch_icon_url.dart @@ -13,7 +13,7 @@ void onReceivedTouchIconUrl() { ].contains(defaultTargetPlatform); testWidgets('onReceivedTouchIconUrl', (WidgetTester tester) async { - final Completer controllerCompleter = Completer(); + final Completer controllerCompleter = Completer(); final Completer onReceivedTouchIconUrlCompleter = Completer(); diff --git a/example/integration_test/in_app_webview/on_scroll_changed.dart b/example/integration_test/in_app_webview/on_scroll_changed.dart index 6c0167a0..241e17cc 100644 --- a/example/integration_test/in_app_webview/on_scroll_changed.dart +++ b/example/integration_test/in_app_webview/on_scroll_changed.dart @@ -19,7 +19,7 @@ void onScrollChanged() { var url = !kIsWeb ? TEST_URL_1 : TEST_WEB_PLATFORM_URL_1; testWidgets('onScrollChanged', (WidgetTester tester) async { - final Completer controllerCompleter = Completer(); + final Completer controllerCompleter = Completer(); final Completer pageLoaded = Completer(); final Completer onScrollChangedCompleter = Completer(); await tester.pumpWidget( diff --git a/example/integration_test/in_app_webview/on_title_changed.dart b/example/integration_test/in_app_webview/on_title_changed.dart index 0cfcf176..4a381fd2 100644 --- a/example/integration_test/in_app_webview/on_title_changed.dart +++ b/example/integration_test/in_app_webview/on_title_changed.dart @@ -19,7 +19,7 @@ void onTitleChanged() { var url = !kIsWeb ? TEST_URL_1 : TEST_WEB_PLATFORM_URL_1; testWidgets('onTitleChanged', (WidgetTester tester) async { - final Completer controllerCompleter = Completer(); + final Completer controllerCompleter = Completer(); final Completer pageLoaded = Completer(); final Completer onTitleChangedCompleter = Completer(); diff --git a/example/integration_test/in_app_webview/on_update_visited_history.dart b/example/integration_test/in_app_webview/on_update_visited_history.dart index 9420c142..afb372e6 100644 --- a/example/integration_test/in_app_webview/on_update_visited_history.dart +++ b/example/integration_test/in_app_webview/on_update_visited_history.dart @@ -19,7 +19,7 @@ void onUpdateVisitedHistory() { var url = !kIsWeb ? TEST_CROSS_PLATFORM_URL_1 : TEST_WEB_PLATFORM_URL_1; testWidgets('onUpdateVisitedHistory', (WidgetTester tester) async { - final Completer controllerCompleter = Completer(); + final Completer controllerCompleter = Completer(); final Completer firstPushCompleter = Completer(); final Completer secondPushCompleter = Completer(); final Completer pageLoaded = Completer(); diff --git a/example/integration_test/in_app_webview/page_down_up.dart b/example/integration_test/in_app_webview/page_down_up.dart index 92e512a8..153e33b7 100644 --- a/example/integration_test/in_app_webview/page_down_up.dart +++ b/example/integration_test/in_app_webview/page_down_up.dart @@ -15,7 +15,7 @@ void pageDownUp() { ].contains(defaultTargetPlatform); testWidgets('pageDown/pageUp', (WidgetTester tester) async { - final Completer controllerCompleter = Completer(); + final Completer controllerCompleter = Completer(); final Completer pageLoaded = Completer(); await tester.pumpWidget( diff --git a/example/integration_test/in_app_webview/pause_resume.dart b/example/integration_test/in_app_webview/pause_resume.dart index b008fdc7..f1d7ed2f 100644 --- a/example/integration_test/in_app_webview/pause_resume.dart +++ b/example/integration_test/in_app_webview/pause_resume.dart @@ -15,7 +15,7 @@ void pauseResume() { ].contains(defaultTargetPlatform); testWidgets('pause/resume', (WidgetTester tester) async { - final Completer controllerCompleter = Completer(); + final Completer controllerCompleter = Completer(); final Completer pageLoaded = Completer(); await tester.pumpWidget( diff --git a/example/integration_test/in_app_webview/pause_resume_timers.dart b/example/integration_test/in_app_webview/pause_resume_timers.dart index d18792cb..733bed59 100644 --- a/example/integration_test/in_app_webview/pause_resume_timers.dart +++ b/example/integration_test/in_app_webview/pause_resume_timers.dart @@ -17,7 +17,7 @@ void pauseResumeTimers() { ].contains(defaultTargetPlatform); testWidgets('pause/resume timers', (WidgetTester tester) async { - final Completer controllerCompleter = Completer(); + final Completer controllerCompleter = Completer(); final Completer pageLoaded = Completer(); await tester.pumpWidget( diff --git a/example/integration_test/in_app_webview/post_requests.dart b/example/integration_test/in_app_webview/post_requests.dart index e5fc931d..a3c93946 100644 --- a/example/integration_test/in_app_webview/post_requests.dart +++ b/example/integration_test/in_app_webview/post_requests.dart @@ -19,7 +19,7 @@ void postRequests() { group('POST requests', () { testWidgets('initialUrlRequest', (WidgetTester tester) async { - final Completer controllerCompleter = Completer(); + final Completer controllerCompleter = Completer(); final Completer postPageLoaded = Completer(); await tester.pumpWidget( @@ -57,7 +57,7 @@ void postRequests() { }); testWidgets('loadUrl', (WidgetTester tester) async { - final Completer controllerCompleter = Completer(); + final Completer controllerCompleter = Completer(); final Completer postPageLoaded = Completer(); await tester.pumpWidget( @@ -102,7 +102,7 @@ void postRequests() { }); testWidgets('postUrl', (WidgetTester tester) async { - final Completer controllerCompleter = Completer(); + final Completer controllerCompleter = Completer(); final Completer postPageLoaded = Completer(); await tester.pumpWidget( diff --git a/example/integration_test/in_app_webview/print_current_page.dart b/example/integration_test/in_app_webview/print_current_page.dart index b0162a11..6307357b 100644 --- a/example/integration_test/in_app_webview/print_current_page.dart +++ b/example/integration_test/in_app_webview/print_current_page.dart @@ -19,7 +19,7 @@ void printCurrentPage() { var url = !kIsWeb ? TEST_CROSS_PLATFORM_URL_1 : TEST_WEB_PLATFORM_URL_1; testWidgets('printCurrentPage', (WidgetTester tester) async { - final Completer controllerCompleter = Completer(); + final Completer controllerCompleter = Completer(); final Completer pageLoaded = Completer(); await tester.pumpWidget( diff --git a/example/integration_test/in_app_webview/programmatic_scroll.dart b/example/integration_test/in_app_webview/programmatic_scroll.dart index 67f70a30..1999cdac 100644 --- a/example/integration_test/in_app_webview/programmatic_scroll.dart +++ b/example/integration_test/in_app_webview/programmatic_scroll.dart @@ -57,7 +57,7 @@ void programmaticScroll() { : TEST_WEB_PLATFORM_URL_1; final Completer pageLoaded = Completer(); - final Completer controllerCompleter = Completer(); + final Completer controllerCompleter = Completer(); await tester.pumpWidget( Directionality( @@ -134,7 +134,7 @@ void programmaticScroll() { base64Encode(const Utf8Encoder().convert(scrollTestPage)); final Completer pageLoaded = Completer(); - final Completer controllerCompleter = Completer(); + final Completer controllerCompleter = Completer(); await tester.pumpWidget( Directionality( diff --git a/example/integration_test/in_app_webview/programmatic_zoom_scale.dart b/example/integration_test/in_app_webview/programmatic_zoom_scale.dart index dcc983e3..bc56acfe 100644 --- a/example/integration_test/in_app_webview/programmatic_zoom_scale.dart +++ b/example/integration_test/in_app_webview/programmatic_zoom_scale.dart @@ -24,7 +24,7 @@ void programmaticZoomScale() { ].contains(defaultTargetPlatform); testWidgets('zoomIn/zoomOut', (WidgetTester tester) async { - final Completer controllerCompleter = Completer(); + final Completer controllerCompleter = Completer(); final Completer pageLoaded = Completer(); await tester.pumpWidget( @@ -52,7 +52,7 @@ void programmaticZoomScale() { }, skip: shouldSkipTest1); testWidgets('onZoomScaleChanged', (WidgetTester tester) async { - final Completer controllerCompleter = Completer(); + final Completer controllerCompleter = Completer(); final Completer pageLoaded = Completer(); final Completer onZoomScaleChangedCompleter = Completer(); @@ -92,7 +92,7 @@ void programmaticZoomScale() { }); testWidgets('zoomBy', (WidgetTester tester) async { - final Completer controllerCompleter = Completer(); + final Completer controllerCompleter = Completer(); final Completer pageLoaded = Completer(); await tester.pumpWidget( @@ -121,7 +121,7 @@ void programmaticZoomScale() { }); testWidgets('getZoomScale', (WidgetTester tester) async { - final Completer controllerCompleter = Completer(); + final Completer controllerCompleter = Completer(); final Completer pageLoaded = Completer(); await tester.pumpWidget( diff --git a/example/integration_test/in_app_webview/pull_to_refresh.dart b/example/integration_test/in_app_webview/pull_to_refresh.dart index ba02b05f..4c657913 100644 --- a/example/integration_test/in_app_webview/pull_to_refresh.dart +++ b/example/integration_test/in_app_webview/pull_to_refresh.dart @@ -18,7 +18,7 @@ void pullToRefresh() { testWidgets('launches with pull-to-refresh feature', (WidgetTester tester) async { - final Completer controllerCompleter = Completer(); + final Completer controllerCompleter = Completer(); final pullToRefreshController = PullToRefreshController( settings: PullToRefreshSettings( color: Colors.blue, diff --git a/example/integration_test/in_app_webview/reload.dart b/example/integration_test/in_app_webview/reload.dart index 1248ec31..b359d364 100644 --- a/example/integration_test/in_app_webview/reload.dart +++ b/example/integration_test/in_app_webview/reload.dart @@ -27,7 +27,7 @@ void reload() { ].contains(defaultTargetPlatform); testWidgets('from origin', (WidgetTester tester) async { - final Completer controllerCompleter = Completer(); + final Completer controllerCompleter = Completer(); final Completer pageLoaded = Completer(); await tester.pumpWidget( @@ -55,7 +55,7 @@ void reload() { }, skip: shouldSkipTest1); testWidgets('basic', (WidgetTester tester) async { - final Completer controllerCompleter = Completer(); + final Completer controllerCompleter = Completer(); final StreamController pageLoads = StreamController.broadcast(); diff --git a/example/integration_test/in_app_webview/request_focus_node_href.dart b/example/integration_test/in_app_webview/request_focus_node_href.dart index 72ab7b00..af75b827 100644 --- a/example/integration_test/in_app_webview/request_focus_node_href.dart +++ b/example/integration_test/in_app_webview/request_focus_node_href.dart @@ -17,7 +17,7 @@ void requestFocusNodeHref() { ].contains(defaultTargetPlatform); testWidgets('requestFocusNodeHref', (WidgetTester tester) async { - final Completer controllerCompleter = Completer(); + final Completer controllerCompleter = Completer(); final Completer pageLoaded = Completer(); await tester.pumpWidget( diff --git a/example/integration_test/in_app_webview/request_image_ref.dart b/example/integration_test/in_app_webview/request_image_ref.dart index 93f29c40..b0eaa5d0 100644 --- a/example/integration_test/in_app_webview/request_image_ref.dart +++ b/example/integration_test/in_app_webview/request_image_ref.dart @@ -17,7 +17,7 @@ void requestImageRef() { ].contains(defaultTargetPlatform); testWidgets('requestImageRef', (WidgetTester tester) async { - final Completer controllerCompleter = Completer(); + final Completer controllerCompleter = Completer(); final Completer pageLoaded = Completer(); await tester.pumpWidget( diff --git a/example/integration_test/in_app_webview/resize_webview.dart b/example/integration_test/in_app_webview/resize_webview.dart index 5cc45513..6306879b 100644 --- a/example/integration_test/in_app_webview/resize_webview.dart +++ b/example/integration_test/in_app_webview/resize_webview.dart @@ -37,7 +37,7 @@ void resizeWebView() { final Completer resizeCompleter = Completer(); final Completer pageStarted = Completer(); final Completer pageLoaded = Completer(); - final Completer controllerCompleter = Completer(); + final Completer controllerCompleter = Completer(); final GlobalKey key = GlobalKey(); final InAppWebView webView = InAppWebView( diff --git a/example/integration_test/in_app_webview/set_get_settings.dart b/example/integration_test/in_app_webview/set_get_settings.dart index 1b10f575..331552b2 100644 --- a/example/integration_test/in_app_webview/set_get_settings.dart +++ b/example/integration_test/in_app_webview/set_get_settings.dart @@ -19,7 +19,7 @@ void setGetSettings() { final url = !kIsWeb ? TEST_CROSS_PLATFORM_URL_1 : TEST_WEB_PLATFORM_URL_1; testWidgets('set/get settings', (WidgetTester tester) async { - final Completer controllerCompleter = Completer(); + final Completer controllerCompleter = Completer(); final Completer pageLoaded = Completer(); await tester.pumpWidget( diff --git a/example/integration_test/in_app_webview/should_intercept_request.dart b/example/integration_test/in_app_webview/should_intercept_request.dart index e46cd156..19d5949c 100644 --- a/example/integration_test/in_app_webview/should_intercept_request.dart +++ b/example/integration_test/in_app_webview/should_intercept_request.dart @@ -20,7 +20,7 @@ void shouldInterceptRequest() { ]; List resourceLoaded = []; - final Completer controllerCompleter = Completer(); + final Completer controllerCompleter = Completer(); final Completer pageLoaded = Completer(); final Completer loadedResourceCompleter = Completer(); diff --git a/example/integration_test/in_app_webview/should_override_url_loading.dart b/example/integration_test/in_app_webview/should_override_url_loading.dart index d0372b73..ba5e2d0a 100644 --- a/example/integration_test/in_app_webview/should_override_url_loading.dart +++ b/example/integration_test/in_app_webview/should_override_url_loading.dart @@ -24,7 +24,7 @@ void shouldOverrideUrlLoading() { base64Encode(const Utf8Encoder().convert(page)); testWidgets('can allow requests', (WidgetTester tester) async { - final Completer controllerCompleter = Completer(); + final Completer controllerCompleter = Completer(); final StreamController pageLoads = StreamController.broadcast(); await tester.pumpWidget( @@ -76,7 +76,7 @@ void shouldOverrideUrlLoading() { testWidgets( 'allow requests on iOS only if navigationType == NavigationType.LINK_ACTIVATED', (WidgetTester tester) async { - final Completer controllerCompleter = Completer(); + final Completer controllerCompleter = Completer(); final StreamController pageLoads = StreamController.broadcast(); await tester.pumpWidget( @@ -134,7 +134,7 @@ void shouldOverrideUrlLoading() { }, skip: shouldSkipTest2); testWidgets('can block requests', (WidgetTester tester) async { - final Completer controllerCompleter = Completer(); + final Completer controllerCompleter = Completer(); final StreamController pageLoads = StreamController.broadcast(); await tester.pumpWidget( @@ -185,7 +185,7 @@ void shouldOverrideUrlLoading() { }); testWidgets('supports asynchronous decisions', (WidgetTester tester) async { - final Completer controllerCompleter = Completer(); + final Completer controllerCompleter = Completer(); final StreamController pageLoads = StreamController.broadcast(); await tester.pumpWidget( diff --git a/example/integration_test/in_app_webview/ssl_request.dart b/example/integration_test/in_app_webview/ssl_request.dart index 79645b9b..fd756412 100644 --- a/example/integration_test/in_app_webview/ssl_request.dart +++ b/example/integration_test/in_app_webview/ssl_request.dart @@ -17,7 +17,7 @@ void sslRequest() { ].contains(defaultTargetPlatform); testWidgets('SSL request', (WidgetTester tester) async { - final Completer controllerCompleter = Completer(); + final Completer controllerCompleter = Completer(); final Completer pageLoaded = Completer(); await tester.pumpWidget( Directionality( diff --git a/example/integration_test/in_app_webview/stop_loading.dart b/example/integration_test/in_app_webview/stop_loading.dart index 0e9fbcbb..ab067b04 100644 --- a/example/integration_test/in_app_webview/stop_loading.dart +++ b/example/integration_test/in_app_webview/stop_loading.dart @@ -18,7 +18,7 @@ void stopLoading() { ].contains(defaultTargetPlatform); testWidgets('stopLoading', (WidgetTester tester) async { - final Completer controllerCompleter = Completer(); + final Completer controllerCompleter = Completer(); final Completer pageLoaded = Completer(); await tester.pumpWidget( diff --git a/example/integration_test/in_app_webview/t_rex_runner_game.dart b/example/integration_test/in_app_webview/t_rex_runner_game.dart index fabdd663..23e98cd6 100644 --- a/example/integration_test/in_app_webview/t_rex_runner_game.dart +++ b/example/integration_test/in_app_webview/t_rex_runner_game.dart @@ -17,7 +17,7 @@ void tRexRunnerGame() { ].contains(defaultTargetPlatform); testWidgets('T-Rex Runner game', (WidgetTester tester) async { - final Completer controllerCompleter = Completer(); + final Completer controllerCompleter = Completer(); final Completer pageLoaded = Completer(); await tester.pumpWidget( diff --git a/example/integration_test/in_app_webview/take_screenshot.dart b/example/integration_test/in_app_webview/take_screenshot.dart index 331a5181..7592df27 100644 --- a/example/integration_test/in_app_webview/take_screenshot.dart +++ b/example/integration_test/in_app_webview/take_screenshot.dart @@ -17,7 +17,7 @@ void takeScreenshot() { ].contains(defaultTargetPlatform); testWidgets('takeScreenshot', (WidgetTester tester) async { - final Completer controllerCompleter = Completer(); + final Completer controllerCompleter = Completer(); final Completer pageLoaded = Completer(); await tester.pumpWidget( diff --git a/example/integration_test/in_app_webview/user_scripts.dart b/example/integration_test/in_app_webview/user_scripts.dart index fa943970..fb75d2d1 100644 --- a/example/integration_test/in_app_webview/user_scripts.dart +++ b/example/integration_test/in_app_webview/user_scripts.dart @@ -19,7 +19,7 @@ void userScripts() { group('user scripts', () { testWidgets('initialUserScripts', (WidgetTester tester) async { - final Completer controllerCompleter = Completer(); + final Completer controllerCompleter = Completer(); final Completer pageLoaded = Completer(); await tester.pumpWidget( @@ -77,7 +77,7 @@ void userScripts() { }); testWidgets('add/remove user scripts', (WidgetTester tester) async { - final Completer controllerCompleter = Completer(); + final Completer controllerCompleter = Completer(); final StreamController pageLoads = StreamController.broadcast(); diff --git a/example/integration_test/in_app_webview/web_archive.dart b/example/integration_test/in_app_webview/web_archive.dart index d4a83c46..e9cab8e7 100644 --- a/example/integration_test/in_app_webview/web_archive.dart +++ b/example/integration_test/in_app_webview/web_archive.dart @@ -27,7 +27,7 @@ void webArchive() { ].contains(defaultTargetPlatform); testWidgets('create data', (WidgetTester tester) async { - final Completer controllerCompleter = Completer(); + final Completer controllerCompleter = Completer(); final Completer pageLoaded = Completer(); await tester.pumpWidget( @@ -54,7 +54,7 @@ void webArchive() { }, skip: shouldSkipTest1); testWidgets('save', (WidgetTester tester) async { - final Completer controllerCompleter = Completer(); + final Completer controllerCompleter = Completer(); final Completer pageLoaded = Completer(); await tester.pumpWidget( diff --git a/example/integration_test/in_app_webview/web_history.dart b/example/integration_test/in_app_webview/web_history.dart index deb4b1e5..378212c0 100644 --- a/example/integration_test/in_app_webview/web_history.dart +++ b/example/integration_test/in_app_webview/web_history.dart @@ -27,7 +27,7 @@ void webHistory() { testWidgets('get history list and go back/forward', (WidgetTester tester) async { - final Completer controllerCompleter = Completer(); + final Completer controllerCompleter = Completer(); await tester.pumpWidget( Directionality( @@ -124,7 +124,7 @@ void webHistory() { final shouldSkipTest2 = !kIsWeb; testWidgets('go back/forward on web platform', (WidgetTester tester) async { - final Completer controllerCompleter = Completer(); + final Completer controllerCompleter = Completer(); final StreamController pageLoads = StreamController.broadcast(); @@ -182,7 +182,7 @@ void webHistory() { ].contains(defaultTargetPlatform); testWidgets('clearHistory', (WidgetTester tester) async { - final Completer controllerCompleter = Completer(); + final Completer controllerCompleter = Completer(); final StreamController pageLoads = StreamController.broadcast(); diff --git a/example/integration_test/in_app_webview/web_message.dart b/example/integration_test/in_app_webview/web_message.dart index 83b957ff..85662399 100644 --- a/example/integration_test/in_app_webview/web_message.dart +++ b/example/integration_test/in_app_webview/web_message.dart @@ -18,7 +18,7 @@ void webMessage() { group('WebMessage', () { testWidgets('WebMessageChannel', (WidgetTester tester) async { - final Completer controllerCompleter = Completer(); + final Completer controllerCompleter = Completer(); final Completer webMessageCompleter = Completer(); await tester.pumpWidget( Directionality( @@ -85,7 +85,7 @@ void webMessage() { }); testWidgets('WebMessageListener', (WidgetTester tester) async { - final Completer controllerCompleter = Completer(); + final Completer controllerCompleter = Completer(); final Completer pageLoaded = Completer(); final Completer webMessageCompleter = Completer(); await tester.pumpWidget( diff --git a/example/integration_test/in_app_webview/webview_windows.dart b/example/integration_test/in_app_webview/webview_windows.dart index 6146a84a..b4ad4f99 100644 --- a/example/integration_test/in_app_webview/webview_windows.dart +++ b/example/integration_test/in_app_webview/webview_windows.dart @@ -27,7 +27,7 @@ void webViewWindows() { ].contains(defaultTargetPlatform); testWidgets('onCreateWindow return false', (WidgetTester tester) async { - final Completer controllerCompleter = Completer(); + final Completer controllerCompleter = Completer(); final Completer pageLoaded = Completer(); await tester.pumpWidget( Directionality( @@ -68,7 +68,7 @@ void webViewWindows() { ].contains(defaultTargetPlatform); testWidgets('onCreateWindow return true', (WidgetTester tester) async { - final Completer controllerCompleter = Completer(); + final Completer controllerCompleter = Completer(); final Completer onCreateWindowCompleter = Completer(); await tester.pumpWidget( Directionality( @@ -140,7 +140,7 @@ void webViewWindows() { testWidgets('window.open() with target _blank opens in same window', (WidgetTester tester) async { - final Completer controllerCompleter = Completer(); + final Completer controllerCompleter = Completer(); final StreamController pageLoads = StreamController.broadcast(); await tester.pumpWidget( @@ -182,7 +182,7 @@ 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 controllerCompleter = Completer(); + final Completer controllerCompleter = Completer(); final StreamController pageLoads = StreamController.broadcast(); await tester.pumpWidget( @@ -264,7 +264,7 @@ void webViewWindows() { '''; final String openWindowTestBase64 = base64Encode(const Utf8Encoder().convert(openWindowTest)); - final Completer controllerCompleter = Completer(); + final Completer controllerCompleter = Completer(); final Completer pageLoadCompleter = Completer(); await tester.pumpWidget( @@ -307,7 +307,7 @@ 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 controllerCompleter = Completer(); + final Completer controllerCompleter = Completer(); final Completer onCreateWindowCalled = Completer(); await tester.pumpWidget( Directionality( diff --git a/example/integration_test/proxy_controller/clear_and_set_proxy_override.dart b/example/integration_test/proxy_controller/clear_and_set_proxy_override.dart index b0f3ec37..160d4beb 100644 --- a/example/integration_test/proxy_controller/clear_and_set_proxy_override.dart +++ b/example/integration_test/proxy_controller/clear_and_set_proxy_override.dart @@ -16,7 +16,7 @@ void clearAndSetProxyOverride() { ].contains(defaultTargetPlatform); testWidgets('clear and set proxy override', (WidgetTester tester) async { - final Completer controllerCompleter = Completer(); + final Completer controllerCompleter = Completer(); final Completer pageLoaded = Completer(); var proxyAvailable = diff --git a/example/ios/Flutter/flutter_export_environment.sh b/example/ios/Flutter/flutter_export_environment.sh index 9e98dd5e..fae63896 100755 --- a/example/ios/Flutter/flutter_export_environment.sh +++ b/example/ios/Flutter/flutter_export_environment.sh @@ -3,12 +3,11 @@ export "FLUTTER_ROOT=/Users/lorenzopichilli/fvm/versions/2.10.4" export "FLUTTER_APPLICATION_PATH=/Users/lorenzopichilli/Desktop/flutter_inappwebview/example" export "COCOAPODS_PARALLEL_CODE_SIGN=true" -export "FLUTTER_TARGET=/Users/lorenzopichilli/Desktop/flutter_inappwebview/example/lib/main.dart" +export "FLUTTER_TARGET=lib/main.dart" export "FLUTTER_BUILD_DIR=build" export "FLUTTER_BUILD_NAME=1.0.0" export "FLUTTER_BUILD_NUMBER=1" -export "DART_DEFINES=Zmx1dHRlci5pbnNwZWN0b3Iuc3RydWN0dXJlZEVycm9ycz10cnVl,RkxVVFRFUl9XRUJfQVVUT19ERVRFQ1Q9dHJ1ZQ==" export "DART_OBFUSCATION=false" export "TRACK_WIDGET_CREATION=true" export "TREE_SHAKE_ICONS=false" -export "PACKAGE_CONFIG=/Users/lorenzopichilli/Desktop/flutter_inappwebview/example/.dart_tool/package_config.json" +export "PACKAGE_CONFIG=.dart_tool/package_config.json" diff --git a/lib/src/debug_logging_settings.dart b/lib/src/debug_logging_settings.dart index 7a244615..8321303b 100644 --- a/lib/src/debug_logging_settings.dart +++ b/lib/src/debug_logging_settings.dart @@ -1,7 +1,4 @@ import 'package:flutter/foundation.dart'; -import 'in_app_webview/webview.dart'; -import 'chrome_safari_browser/chrome_safari_browser.dart'; -import 'in_app_browser/in_app_browser.dart'; ///Class that represents the debug logging settings. class DebugLoggingSettings {