- Notifications
You must be signed in to change notification settings - Fork40
Ignore a URL with an unsupported scheme#447
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
…ed (#9966)Completes `PresentationRequest` constructor test with change [latest change made in Presentation API](w3c/presentation-api#447). The following tests are added:- To check if an instance of `PresentationRequest` with URLs including one with an unsupported scheme is successfully constructed- To check if `NotSupportedError` is thrown when only single or multiple URLs with unsupported schemes are specified
markafoltz left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Thanks for the PR. One editorial suggestion.
index.html Outdated
| <li>Resolve<var>U</var> relative to the API base URL specified | ||
| by the<a>current settings object</a>, and add the resulting | ||
| absolute URL (if any) to<var>presentationUrls</var>. | ||
| absolute URL (if any, and if the resulting scheme is supported |
markafoltzMar 22, 2018 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
This might be easier to read if it were broken into three steps. Here is one way that could be done.
- Let A be absolute URL that is the result of resolvingU relative to the API base URL specified by the current settings object.
- If the parse a URL algorithm failed, then throw a SyntaxError exception and abort all remaining steps.
- If A has a scheme supported by the controlling user agent, add A to presentationUrls.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
LGTM. Thanks for your suggestion.
tomoyukilabs commentedMar 26, 2018
@mfoltzgoogle PTAL |
markafoltz left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
LGTM with one minor typo
| <li>Resolve<var>U</var>relative to the API base URL specified | ||
| by the<a>current settings object</a>, and add theresulting | ||
| absolute URL (if any) to<var>presentationUrls</var>. | ||
| <li>let<var>A</var>be an absolute URL that is the result of |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Nit: s/let/Let/
markafoltz commentedMar 26, 2018
Merging, can fix the typo in a followup commit. |
tomoyukilabs commentedMar 27, 2018
@mfoltzgoogle Many thanks for your review and fixing the typo. |
… unsupported scheme is ignored, a=testonlyAutomatic update from web-platform-tests[presentation-api] check if a URL with an unsupported scheme is ignored (#9966)Completes `PresentationRequest` constructor test with change [latest change made in Presentation API](w3c/presentation-api#447). The following tests are added:- To check if an instance of `PresentationRequest` with URLs including one with an unsupported scheme is successfully constructed- To check if `NotSupportedError` is thrown when only single or multiple URLs with unsupported schemes are specifiedwpt-commits: 1cbb9282ad842c48fff8a86e121ce7e33f6ca4a3wpt-pr: 9966wpt-commits: 1cbb9282ad842c48fff8a86e121ce7e33f6ca4a3wpt-pr: 9966
… unsupported scheme is ignored, a=testonlyAutomatic update from web-platform-tests[presentation-api] check if a URL with an unsupported scheme is ignored (#9966)Completes `PresentationRequest` constructor test with change [latest change made in Presentation API](w3c/presentation-api#447). The following tests are added:- To check if an instance of `PresentationRequest` with URLs including one with an unsupported scheme is successfully constructed- To check if `NotSupportedError` is thrown when only single or multiple URLs with unsupported schemes are specifiedwpt-commits: 1cbb9282ad842c48fff8a86e121ce7e33f6ca4a3wpt-pr: 9966wpt-commits: 1cbb9282ad842c48fff8a86e121ce7e33f6ca4a3wpt-pr: 9966UltraBlame original commit: 7b6feb16ae6fe5ee0889b819b649b2b41e003893
… unsupported scheme is ignored, a=testonlyAutomatic update from web-platform-tests[presentation-api] check if a URL with an unsupported scheme is ignored (#9966)Completes `PresentationRequest` constructor test with change [latest change made in Presentation API](w3c/presentation-api#447). The following tests are added:- To check if an instance of `PresentationRequest` with URLs including one with an unsupported scheme is successfully constructed- To check if `NotSupportedError` is thrown when only single or multiple URLs with unsupported schemes are specifiedwpt-commits: 1cbb9282ad842c48fff8a86e121ce7e33f6ca4a3wpt-pr: 9966wpt-commits: 1cbb9282ad842c48fff8a86e121ce7e33f6ca4a3wpt-pr: 9966UltraBlame original commit: 7b6feb16ae6fe5ee0889b819b649b2b41e003893
… unsupported scheme is ignored, a=testonlyAutomatic update from web-platform-tests[presentation-api] check if a URL with an unsupported scheme is ignored (#9966)Completes `PresentationRequest` constructor test with change [latest change made in Presentation API](w3c/presentation-api#447). The following tests are added:- To check if an instance of `PresentationRequest` with URLs including one with an unsupported scheme is successfully constructed- To check if `NotSupportedError` is thrown when only single or multiple URLs with unsupported schemes are specifiedwpt-commits: 1cbb9282ad842c48fff8a86e121ce7e33f6ca4a3wpt-pr: 9966wpt-commits: 1cbb9282ad842c48fff8a86e121ce7e33f6ca4a3wpt-pr: 9966UltraBlame original commit: 7b6feb16ae6fe5ee0889b819b649b2b41e003893
… unsupported scheme is ignored, a=testonlyAutomatic update from web-platform-tests[presentation-api] check if a URL with an unsupported scheme is ignored (#9966)Completes `PresentationRequest` constructor test with change [latest change made in Presentation API](w3c/presentation-api#447). The following tests are added:- To check if an instance of `PresentationRequest` with URLs including one with an unsupported scheme is successfully constructed- To check if `NotSupportedError` is thrown when only single or multiple URLs with unsupported schemes are specifiedwpt-commits: 1cbb9282ad842c48fff8a86e121ce7e33f6ca4a3wpt-pr: 9966wpt-commits: 1cbb9282ad842c48fff8a86e121ce7e33f6ca4a3wpt-pr: 9966
Uh oh!
There was an error while loading.Please reload this page.
This PR addresses#446.
Preview |Diff