forked from flutter/plugins
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[url_launcher_web] Added support for mailto in url_launcher_web plugin (
flutter#2490) * Unit tests * Updated version and CHANGELOG
- Loading branch information
Showing
4 changed files
with
16 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,6 +29,10 @@ void main() { | |
expect(canLaunch('https://google.com'), completion(isTrue)); | ||
}); | ||
|
||
test('can launch "mailto" URLs', () { | ||
expect(canLaunch('mailto:[email protected]'), completion(isTrue)); | ||
}); | ||
|
||
test('cannot launch "tel" URLs', () { | ||
expect(canLaunch('tel:5551234567'), completion(isFalse)); | ||
}); | ||
|
@@ -37,6 +41,10 @@ void main() { | |
expect(launch('https://www.google.com'), completion(isTrue)); | ||
}); | ||
|
||
test('launching a "mailto" returns true', () { | ||
expect(launch('mailto:[email protected]'), completion(isTrue)); | ||
}); | ||
|
||
test('the window that is launched is a new window', () { | ||
final UrlLauncherPlugin urlLauncherPlugin = UrlLauncherPlugin(); | ||
final html.WindowBase newWindow = | ||
|