From ec47b1918dcaa34c04490e4026626e287108f41c Mon Sep 17 00:00:00 2001 From: Lorenzo Pichilli Date: Mon, 25 Nov 2019 01:42:27 +0100 Subject: [PATCH] fixed android content blocker, updated flutter driver tests --- .github/ISSUE_TEMPLATE/BUG_REPORT.md | 1 + .idea/workspace.xml | 880 ++++++++++-------- .../ContentBlocker/ContentBlockerHandler.java | 7 + .../ios/Flutter/flutter_export_environment.sh | 2 +- example/lib/in_app_webiew_example.screen.dart | 12 +- example/pubspec.yaml | 3 - .../test_assets/in_app_webview_ajax_test.html | 24 - .../in_app_webview_fetch_test.html | 40 - ...in_app_webview_on_download_start_test.html | 18 - ...bview_on_navigation_state_change_test.html | 26 + example/test_driver/.env.dart | 1 + example/test_driver/app.dart | 1 - example/test_driver/app_test.dart | 388 +++++++- example/test_driver/custom_widget_test.dart | 2 + .../test_driver/in_app_webview_ajax_test.dart | 32 +- .../in_app_webview_content_blocker_test.dart | 70 ++ .../in_app_webview_cookie_manager_test.dart | 69 ++ .../in_app_webview_fetch_test.dart | 48 +- ...ew_http_auth_credential_database_test.dart | 79 ++ .../in_app_webview_initial_data_test.dart | 92 ++ .../in_app_webview_initial_file_test.dart | 4 +- .../in_app_webview_initial_url_test.dart | 4 +- ...n_app_webview_javascript_handler_test.dart | 4 +- ...n_app_webview_on_console_message_test.dart | 4 +- ...in_app_webview_on_download_start_test.dart | 26 +- ..._webview_on_find_result_received_test.dart | 60 ++ .../in_app_webview_on_js_dialog_test.dart | 4 +- .../in_app_webview_on_load_error_test.dart | 59 ++ ...n_app_webview_on_load_http_error_test.dart | 59 ++ ...w_on_load_resource_custom_scheme_test.dart | 4 +- .../in_app_webview_on_load_resource_test.dart | 4 +- ...bview_on_navigation_state_change_test.dart | 72 ++ ..._app_webview_on_progress_changed_test.dart | 61 ++ ...ew_on_received_http_auth_request_test.dart | 7 +- ...app_webview_on_safe_browsing_hit_test.dart | 8 +- ...in_app_webview_on_scroll_changed_test.dart | 63 ++ .../in_app_webview_on_target_blank_test.dart | 4 +- ...view_should_override_url_loading_test.dart | 4 +- .../in_app_webview_ssl_request_test.dart | 70 ++ example/test_driver/main_test.dart | 73 +- example/test_driver/util_test.dart | 19 - lib/src/content_blocker.dart | 77 +- lib/src/cookie_manager.dart | 18 +- lib/src/types.dart | 87 ++ .../index.js | 64 +- test.sh | 8 + tool/env.dart | 12 + 47 files changed, 1973 insertions(+), 701 deletions(-) delete mode 100644 example/test_assets/in_app_webview_ajax_test.html delete mode 100644 example/test_assets/in_app_webview_fetch_test.html delete mode 100644 example/test_assets/in_app_webview_on_download_start_test.html create mode 100644 example/test_assets/in_app_webview_on_navigation_state_change_test.html create mode 100644 example/test_driver/.env.dart create mode 100644 example/test_driver/in_app_webview_content_blocker_test.dart create mode 100644 example/test_driver/in_app_webview_cookie_manager_test.dart create mode 100644 example/test_driver/in_app_webview_http_auth_credential_database_test.dart create mode 100644 example/test_driver/in_app_webview_initial_data_test.dart create mode 100644 example/test_driver/in_app_webview_on_find_result_received_test.dart create mode 100644 example/test_driver/in_app_webview_on_load_error_test.dart create mode 100644 example/test_driver/in_app_webview_on_load_http_error_test.dart create mode 100644 example/test_driver/in_app_webview_on_navigation_state_change_test.dart create mode 100644 example/test_driver/in_app_webview_on_progress_changed_test.dart create mode 100644 example/test_driver/in_app_webview_on_scroll_changed_test.dart create mode 100644 example/test_driver/in_app_webview_ssl_request_test.dart delete mode 100644 example/test_driver/util_test.dart create mode 100755 test.sh create mode 100644 tool/env.dart diff --git a/.github/ISSUE_TEMPLATE/BUG_REPORT.md b/.github/ISSUE_TEMPLATE/BUG_REPORT.md index c3f6d96c..283e9357 100644 --- a/.github/ISSUE_TEMPLATE/BUG_REPORT.md +++ b/.github/ISSUE_TEMPLATE/BUG_REPORT.md @@ -9,6 +9,7 @@ about: Something is crashing or not working as intended **App version:** **Android version:** **Device information:** +**Flutter version:** ## Description diff --git a/.idea/workspace.xml b/.idea/workspace.xml index 9f439786..f65ca4b3 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -15,23 +15,50 @@ - - + + + + + + + + + + + + + + + - - - - - - + + + + + + + + + + + + + + + + + + + + + - + - - + @@ -56,29 +83,8 @@ - - - - - - - - - - - - - - - - - - - - - - - + + @@ -89,8 +95,8 @@ - - + + @@ -99,10 +105,10 @@ - + - - + + @@ -111,31 +117,34 @@ - + - - - - - - - - - - - + + - + - + - - + + + + + + + + + + + + + + @@ -144,10 +153,24 @@ - + - - + + + + + + + + + + + + + + + + @@ -158,34 +181,12 @@ - removeJavaScriptHandler - __safeBrowsingEnabled__ - __safe - __textZoom - hidden - builtInZoomControls - __builtInZoomControls__ - android.support.v4 - __transparentBackground__ - _dispose - รน - setC - _textFieldController - in_app_webview_on_target_blank_test - createPromptDialog - houldOverrideUrlLoad - InAppWebViewShouldOverrideUrlLoadingTest - toValue - toValue() - url - targetB - availa - onLoadHttpError onReceivedHttpAuthRequest onLoadHtt onLoadError @@ -193,6 +194,29 @@ onSafeBrowsingHit dispose onSafe + 192.1 + flutter + InAppWebView + onFindResultReceived + highlighted + onLoadErr + InAppWebViewInitialFileTest + InAppWebViewInitialDataTest + Fetch + OnLoadHttpError + ONnaviga + InAppWebViewOnNavigationChangeTest + InAppWebViewOnReceivedHttpAuthRequestTest + .css + InAppWebViewOnSafeBrowsingHitTest + InAppWebViewHttpAuthCredentialDatabaseTest + InAppWebViewOnFindResultReceivedTest + InAppWebViewOnProgressChangedTest + nextTest + clear + InAppWebViewOnScrollChangedTest + InAppWebViewOnConsoleMessageTest + Change: activity.getPreferences(0) @@ -210,61 +234,61 @@ - +