File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -871,7 +871,18 @@ void main() {
871871 .single.equals ((url: Uri .parse ('https://a/' ), mode: LaunchMode .inAppBrowserView));
872872 });
873873
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 {
875886 await prepare (tester,
876887 '<p><a href="file:///etc/bad">word</a></p>' );
877888 testBinding.launchUrlResult = false ;
You can’t perform that action at this time.
0 commit comments