This repository has been archived by the owner on Feb 22, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 9.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[url_launcher, url_launcher_web]Added webOnlyWindowName parameter to …
…launch() (#2979)
- Loading branch information
1 parent
161aed2
commit 7c49361
Showing
7 changed files
with
42 additions
and
7 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,7 @@ | ||
## 5.5.1 | ||
|
||
* Added webOnlyWindowName parameter to launch() | ||
|
||
## 5.5.0 | ||
|
||
* Support Linux by default. | ||
|
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 |
---|---|---|
@@ -1,3 +1,7 @@ | ||
# 0.1.3 | ||
|
||
- Added webOnlyWindowName parameter to launch() | ||
|
||
# 0.1.2+1 | ||
|
||
- Update docs | ||
|
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 |
---|---|---|
|
@@ -145,6 +145,19 @@ void main() { | |
|
||
verify(mockWindow.open('sms:+19725551212?body=hello%20there', '')); | ||
}); | ||
test('setting oOnlyLinkTarget as _self opens the url in the same tab', | ||
() { | ||
plugin.openNewWindow("https://www.google.com", | ||
webOnlyWindowName: "_self"); | ||
verify(mockWindow.open('https://www.google.com', '_self')); | ||
}); | ||
|
||
test('setting webOnlyLinkTarget as _blank opens the url in a new tab', | ||
() { | ||
plugin.openNewWindow("https://www.google.com", | ||
webOnlyWindowName: "_blank"); | ||
verify(mockWindow.open('https://www.google.com', '_blank')); | ||
}); | ||
|
||
group('Safari', () { | ||
setUp(() { | ||
|
@@ -181,6 +194,13 @@ void main() { | |
verify( | ||
mockWindow.open('sms:+19725551212?body=hello%20there', '_top')); | ||
}); | ||
test( | ||
'mailto urls should use _blank if webOnlyWindowName is set as _blank', | ||
() { | ||
plugin.openNewWindow("mailto:[email protected]", | ||
webOnlyWindowName: "_blank"); | ||
verify(mockWindow.open("mailto:[email protected]", "_blank")); | ||
}); | ||
}); | ||
}); | ||
}); | ||
|