fixed integration tests, fixed android evaluation javascript with content world

This commit is contained in:
Lorenzo Pichilli 2022-10-14 01:55:54 +02:00
parent 71421d7155
commit 48d8f73b23
75 changed files with 125 additions and 130 deletions

View File

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

View File

@ -18,7 +18,7 @@ void setGetDelete() {
testWidgets('set, get, delete', (WidgetTester tester) async {
CookieManager cookieManager = CookieManager.instance();
final Completer controllerCompleter = Completer<InAppWebViewController>();
final Completer<InAppWebViewController> controllerCompleter = Completer<InAppWebViewController>();
final Completer<String> pageLoaded = Completer<String>();
await tester.pumpWidget(
Directionality(

View File

@ -15,7 +15,6 @@ void findInteractions() {
].contains(defaultTargetPlatform);
testWidgets('find interactions', (WidgetTester tester) async {
final Completer controllerCompleter = Completer<InAppWebViewController>();
final Completer<void> pageLoaded = Completer<void>();
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<InAppWebViewController>();
final Completer<void> pageLoaded = Completer<void>();
final Completer<int> numberOfMatchesCompleter = Completer<int>();
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();

View File

@ -17,7 +17,7 @@ void customSize() {
].contains(defaultTargetPlatform);
test('set and get custom size', () async {
final Completer 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,7 @@ void runAndDispose() {
].contains(defaultTargetPlatform);
test('run and dispose', () async {
final Completer controllerCompleter = Completer<InAppWebViewController>();
final Completer<InAppWebViewController> controllerCompleter = Completer<InAppWebViewController>();
final Completer<void> pageLoaded = Completer<void>();
var headlessWebView = new HeadlessInAppWebView(

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -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<InAppWebViewController>();
final Completer<InAppWebViewController> controllerCompleter = Completer<InAppWebViewController>();
final Completer<void> pageLoaded = Completer<void>();
await tester.pumpWidget(

View File

@ -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<InAppWebViewController>();
final Completer<InAppWebViewController> controllerCompleter = Completer<InAppWebViewController>();
final Completer<void> pageLoaded = Completer<void>();
await tester.pumpWidget(

View File

@ -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<InAppWebViewController>();
final Completer<InAppWebViewController> controllerCompleter = Completer<InAppWebViewController>();
final Completer<void> pageLoaded = Completer<void>();
await tester.pumpWidget(

View File

@ -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<InAppWebViewController>();
final Completer<InAppWebViewController> controllerCompleter = Completer<InAppWebViewController>();
final Completer<void> pageLoaded = Completer<void>();
await tester.pumpWidget(

View File

@ -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<InAppWebViewController>();
final Completer<InAppWebViewController> controllerCompleter = Completer<InAppWebViewController>();
final Completer<void> pageLoaded = Completer<void>();
await tester.pumpWidget(

View File

@ -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<InAppWebViewController>();
final Completer<InAppWebViewController> controllerCompleter = Completer<InAppWebViewController>();
final Completer<void> pageLoaded = Completer<void>();
await tester.pumpWidget(

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -19,7 +19,7 @@ void interceptAjaxRequest() {
group('intercept ajax request', () {
testWidgets('send string data', (WidgetTester tester) async {
final Completer controllerCompleter = Completer<InAppWebViewController>();
final Completer<InAppWebViewController> controllerCompleter = Completer<InAppWebViewController>();
final Completer shouldInterceptAjaxPostRequestCompleter =
Completer<void>();
final Completer<Map<String, dynamic>> onAjaxReadyStateChangeCompleter =
@ -104,7 +104,7 @@ void interceptAjaxRequest() {
});
testWidgets('send json data', (WidgetTester tester) async {
final Completer controllerCompleter = Completer<InAppWebViewController>();
final Completer<InAppWebViewController> controllerCompleter = Completer<InAppWebViewController>();
final Completer shouldInterceptAjaxPostRequestCompleter =
Completer<void>();
final Completer<Map<String, dynamic>> onAjaxReadyStateChangeCompleter =
@ -195,7 +195,7 @@ void interceptAjaxRequest() {
});
testWidgets('send URLSearchParams data', (WidgetTester tester) async {
final Completer controllerCompleter = Completer<InAppWebViewController>();
final Completer<InAppWebViewController> controllerCompleter = Completer<InAppWebViewController>();
final Completer shouldInterceptAjaxPostRequestCompleter =
Completer<void>();
final Completer<Map<String, dynamic>> onAjaxReadyStateChangeCompleter =
@ -282,7 +282,7 @@ void interceptAjaxRequest() {
});
testWidgets('send FormData', (WidgetTester tester) async {
final Completer 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,7 @@ void interceptFetchRequest() {
group('intercept fetch request', () {
testWidgets('send string data', (WidgetTester tester) async {
final Completer 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 +97,7 @@ void interceptFetchRequest() {
});
testWidgets('send json data', (WidgetTester tester) async {
final Completer 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 +181,7 @@ void interceptFetchRequest() {
});
testWidgets('send URLSearchParams data', (WidgetTester tester) async {
final Completer 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 +261,7 @@ void interceptFetchRequest() {
});
testWidgets('send FormData', (WidgetTester tester) async {
final Completer 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,7 @@ void isLoading() {
].contains(defaultTargetPlatform);
testWidgets('isLoading', (WidgetTester tester) async {
final Completer 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,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<InAppWebViewController>();
final Completer<InAppWebViewController> controllerCompleter = Completer<InAppWebViewController>();
final StreamController<String> pageLoads =
StreamController<String>.broadcast();

View File

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

View File

@ -15,7 +15,7 @@ void javascriptDialogs() {
].contains(defaultTargetPlatform);
testWidgets('javascript dialogs', (WidgetTester tester) async {
final Completer 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,7 @@ void javascriptHandler() {
].contains(defaultTargetPlatform);
testWidgets('JavaScript Handler', (WidgetTester tester) async {
final Completer 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,7 @@ void loadData() {
].contains(defaultTargetPlatform);
testWidgets('loadData', (WidgetTester tester) async {
final Completer controllerCompleter = Completer<InAppWebViewController>();
final Completer<InAppWebViewController> controllerCompleter = Completer<InAppWebViewController>();
final StreamController<String> pageLoads =
StreamController<String>.broadcast();

View File

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

View File

@ -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<InAppWebViewController>();
final Completer<InAppWebViewController> controllerCompleter = Completer<InAppWebViewController>();
final Completer<String> firstUrlLoad = Completer<String>();
final Completer<String> loadedUrl = Completer<String>();
@ -61,7 +61,7 @@ void loadUrl() {
].contains(defaultTargetPlatform);
testWidgets('loadSimulatedRequest', (WidgetTester tester) async {
final Completer 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,7 @@ void onConsoleMessage() {
].contains(defaultTargetPlatform);
testWidgets('onConsoleMessage', (WidgetTester tester) async {
final Completer controllerCompleter = Completer<InAppWebViewController>();
final Completer<InAppWebViewController> controllerCompleter = Completer<InAppWebViewController>();
final Completer<ConsoleMessage> onConsoleMessageCompleter =
Completer<ConsoleMessage>();
await tester.pumpWidget(

View File

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

View File

@ -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<InAppWebViewController>();
final Completer<InAppWebViewController> controllerCompleter = Completer<InAppWebViewController>();
final Completer<String> onJsBeforeUnloadCompleter = Completer<String>();
await tester.pumpWidget(

View File

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

View File

@ -17,7 +17,7 @@ void onNavigationResponse() {
group("onNavigationResponse", () {
testWidgets('allow navigation', (WidgetTester tester) async {
final Completer controllerCompleter = Completer<InAppWebViewController>();
final Completer<InAppWebViewController> controllerCompleter = Completer<InAppWebViewController>();
final Completer<void> pageLoaded = Completer<void>();
final Completer<String> onNavigationResponseCompleter =
Completer<String>();
@ -51,7 +51,7 @@ void onNavigationResponse() {
});
testWidgets('cancel navigation', (WidgetTester tester) async {
final Completer 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,7 @@ void onPageCommitVisible() {
].contains(defaultTargetPlatform);
testWidgets('onPageCommitVisible', (WidgetTester tester) async {
final Completer controllerCompleter = Completer<InAppWebViewController>();
final Completer<InAppWebViewController> controllerCompleter = Completer<InAppWebViewController>();
final Completer<String> onPageCommitVisibleCompleter = Completer<String>();
await tester.pumpWidget(

View File

@ -20,7 +20,7 @@ void onPermissionRequest() {
expectedValue = [PermissionResourceType.CAMERA];
testWidgets('onPermissionRequest', (WidgetTester tester) async {
final Completer 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,7 @@ void onReceivedIcon() {
].contains(defaultTargetPlatform);
testWidgets('onReceivedIcon', (WidgetTester tester) async {
final Completer 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,7 @@ void onReceivedTouchIconUrl() {
].contains(defaultTargetPlatform);
testWidgets('onReceivedTouchIconUrl', (WidgetTester tester) async {
final Completer controllerCompleter = Completer<InAppWebViewController>();
final Completer<InAppWebViewController> controllerCompleter = Completer<InAppWebViewController>();
final Completer<String> onReceivedTouchIconUrlCompleter =
Completer<String>();

View File

@ -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<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,7 @@ void onTitleChanged() {
var url = !kIsWeb ? TEST_URL_1 : TEST_WEB_PLATFORM_URL_1;
testWidgets('onTitleChanged', (WidgetTester tester) async {
final Completer 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,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<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,7 @@ void pageDownUp() {
].contains(defaultTargetPlatform);
testWidgets('pageDown/pageUp', (WidgetTester tester) async {
final Completer controllerCompleter = Completer<InAppWebViewController>();
final Completer<InAppWebViewController> controllerCompleter = Completer<InAppWebViewController>();
final Completer<void> pageLoaded = Completer<void>();
await tester.pumpWidget(

View File

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

View File

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

View File

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

View File

@ -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<InAppWebViewController>();
final Completer<InAppWebViewController> controllerCompleter = Completer<InAppWebViewController>();
final Completer<void> pageLoaded = Completer<void>();
await tester.pumpWidget(

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -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<InAppWebViewController>();
final Completer<InAppWebViewController> controllerCompleter = Completer<InAppWebViewController>();
final Completer<void> pageLoaded = Completer<void>();
await tester.pumpWidget(

View File

@ -20,7 +20,7 @@ void shouldInterceptRequest() {
];
List<String> resourceLoaded = [];
final Completer 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,7 @@ void shouldOverrideUrlLoading() {
base64Encode(const Utf8Encoder().convert(page));
testWidgets('can allow requests', (WidgetTester tester) async {
final Completer controllerCompleter = Completer<InAppWebViewController>();
final Completer<InAppWebViewController> controllerCompleter = Completer<InAppWebViewController>();
final StreamController<String> pageLoads =
StreamController<String>.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<InAppWebViewController>();
final Completer<InAppWebViewController> controllerCompleter = Completer<InAppWebViewController>();
final StreamController<String> pageLoads =
StreamController<String>.broadcast();
await tester.pumpWidget(
@ -134,7 +134,7 @@ void shouldOverrideUrlLoading() {
}, skip: shouldSkipTest2);
testWidgets('can block requests', (WidgetTester tester) async {
final Completer controllerCompleter = Completer<InAppWebViewController>();
final Completer<InAppWebViewController> controllerCompleter = Completer<InAppWebViewController>();
final StreamController<String> pageLoads =
StreamController<String>.broadcast();
await tester.pumpWidget(
@ -185,7 +185,7 @@ void shouldOverrideUrlLoading() {
});
testWidgets('supports asynchronous decisions', (WidgetTester tester) async {
final Completer controllerCompleter = Completer<InAppWebViewController>();
final Completer<InAppWebViewController> controllerCompleter = Completer<InAppWebViewController>();
final StreamController<String> pageLoads =
StreamController<String>.broadcast();
await tester.pumpWidget(

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -27,7 +27,7 @@ void webHistory() {
testWidgets('get history list and go back/forward',
(WidgetTester tester) async {
final Completer controllerCompleter = Completer<InAppWebViewController>();
final Completer<InAppWebViewController> controllerCompleter = Completer<InAppWebViewController>();
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<InAppWebViewController>();
final Completer<InAppWebViewController> controllerCompleter = Completer<InAppWebViewController>();
final StreamController<String> pageLoads =
StreamController<String>.broadcast();
@ -182,7 +182,7 @@ void webHistory() {
].contains(defaultTargetPlatform);
testWidgets('clearHistory', (WidgetTester tester) async {
final Completer controllerCompleter = Completer<InAppWebViewController>();
final Completer<InAppWebViewController> controllerCompleter = Completer<InAppWebViewController>();
final StreamController<String> pageLoads =
StreamController<String>.broadcast();

View File

@ -18,7 +18,7 @@ void webMessage() {
group('WebMessage', () {
testWidgets('WebMessageChannel', (WidgetTester tester) async {
final Completer controllerCompleter = Completer<InAppWebViewController>();
final Completer<InAppWebViewController> controllerCompleter = Completer<InAppWebViewController>();
final Completer webMessageCompleter = Completer<String>();
await tester.pumpWidget(
Directionality(
@ -85,7 +85,7 @@ void webMessage() {
});
testWidgets('WebMessageListener', (WidgetTester tester) async {
final Completer 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,7 @@ void webViewWindows() {
].contains(defaultTargetPlatform);
testWidgets('onCreateWindow return false', (WidgetTester tester) async {
final Completer controllerCompleter = Completer<InAppWebViewController>();
final Completer<InAppWebViewController> controllerCompleter = Completer<InAppWebViewController>();
final Completer<void> pageLoaded = Completer<void>();
await tester.pumpWidget(
Directionality(
@ -68,7 +68,7 @@ void webViewWindows() {
].contains(defaultTargetPlatform);
testWidgets('onCreateWindow return true', (WidgetTester tester) async {
final Completer controllerCompleter = Completer<InAppWebViewController>();
final Completer<InAppWebViewController> controllerCompleter = Completer<InAppWebViewController>();
final Completer<int> onCreateWindowCompleter = Completer<int>();
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<InAppWebViewController>();
final Completer<InAppWebViewController> controllerCompleter = Completer<InAppWebViewController>();
final StreamController<String> pageLoads =
StreamController<String>.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<InAppWebViewController>();
final Completer<InAppWebViewController> controllerCompleter = Completer<InAppWebViewController>();
final StreamController<String> pageLoads =
StreamController<String>.broadcast();
await tester.pumpWidget(
@ -264,7 +264,7 @@ void webViewWindows() {
''';
final String openWindowTestBase64 =
base64Encode(const Utf8Encoder().convert(openWindowTest));
final Completer controllerCompleter = Completer<InAppWebViewController>();
final Completer<InAppWebViewController> controllerCompleter = Completer<InAppWebViewController>();
final Completer<void> pageLoadCompleter = Completer<void>();
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<InAppWebViewController>();
final Completer<InAppWebViewController> controllerCompleter = Completer<InAppWebViewController>();
final Completer<String> onCreateWindowCalled = Completer<String>();
await tester.pumpWidget(
Directionality(

View File

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

View File

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

View File

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