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