Skip to content
This repository was archived by the owner on Feb 22, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fixed formatting
  • Loading branch information
mvanbeusekom committed Jul 22, 2021
commit 9bce993f6dc1d795e2cf529f843208f55d2b69d6
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,8 @@ public void onAttachedToEngine(FlutterPluginBinding binding) {
binding
.getPlatformViewRegistry()
.registerViewFactory(
"plugins.flutter.io/webview", new FlutterWebViewFactory(messenger, /*containerView=*/ null));
"plugins.flutter.io/webview",
new FlutterWebViewFactory(messenger, /*containerView=*/ null));
flutterCookieManager = new FlutterCookieManager(messenger);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,12 @@ public void before() {
mockWebView = mock(WebView.class);

when(mockWebViewBuilder.setDomStorageEnabled(anyBoolean())).thenReturn(mockWebViewBuilder);
when(mockWebViewBuilder.setJavaScriptCanOpenWindowsAutomatically(anyBoolean())).thenReturn(mockWebViewBuilder);
when(mockWebViewBuilder.setJavaScriptCanOpenWindowsAutomatically(anyBoolean()))
.thenReturn(mockWebViewBuilder);
when(mockWebViewBuilder.setSupportMultipleWindows(anyBoolean())).thenReturn(mockWebViewBuilder);
when(mockWebViewBuilder.setUsesHybridComposition(anyBoolean())).thenReturn(mockWebViewBuilder);
when(mockWebViewBuilder.setWebChromeClient(any(WebChromeClient.class))).thenReturn(mockWebViewBuilder);
when(mockWebViewBuilder.setWebChromeClient(any(WebChromeClient.class)))
.thenReturn(mockWebViewBuilder);

when(mockWebViewBuilder.build()).thenReturn(mockWebView);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,15 @@ public void before() {
mockWebView = mock(WebView.class);
mockedStaticWebViewFactory = mockStatic(WebViewFactory.class);

mockedStaticWebViewFactory.when(new Verification() {
@Override
public void apply() {
WebViewFactory.create(mockContext, false, mockContainerView);
}
}).thenReturn(mockWebView);
mockedStaticWebViewFactory
.when(
new Verification() {
@Override
public void apply() {
WebViewFactory.create(mockContext, false, mockContainerView);
}
})
.thenReturn(mockWebView);
}

@After
Expand Down