File tree 1 file changed +12
-1
lines changed 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -872,7 +872,18 @@ void main() {
872
872
.single.equals ((url: Uri .parse ('https://a/' ), mode: LaunchMode .inAppBrowserView));
873
873
});
874
874
875
- testWidgets ('error dialog if invalid link' , (tester) async {
875
+ testWidgets ('error dialog if invalid URL' , (tester) async {
876
+ await prepare (tester,
877
+ '<p><a href="::invalid::">word</a></p>' );
878
+ await tapText (tester, find.text ('word' ));
879
+ await tester.pump ();
880
+ check (testBinding.takeLaunchUrlCalls ()).isEmpty ();
881
+ checkErrorDialog (tester,
882
+ expectedTitle: 'Unable to open link' ,
883
+ expectedMessage: 'Link could not be opened: ::invalid::' );
884
+ });
885
+
886
+ testWidgets ('error dialog if platform cannot open link' , (tester) async {
876
887
await prepare (tester,
877
888
'<p><a href="file:///etc/bad">word</a></p>' );
878
889
testBinding.launchUrlResult = false ;
You can’t perform that action at this time.
0 commit comments