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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ignore a URL with an unsupported scheme #447
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
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
@@ -1182,13 +1187,19 @@ <h4> | |||
<ol> | |||
<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 |
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 resolving U 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.
@mfoltzgoogle PTAL |
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 the resulting | ||
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/
Merging, can fix the typo in a followup commit. |
@mfoltzgoogle Many thanks for your review and fixing the typo. |
… unsupported scheme is ignored, a=testonly Automatic 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 specified wpt-commits: 1cbb9282ad842c48fff8a86e121ce7e33f6ca4a3 wpt-pr: 9966 wpt-commits: 1cbb9282ad842c48fff8a86e121ce7e33f6ca4a3 wpt-pr: 9966
… unsupported scheme is ignored, a=testonly Automatic 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 specified wpt-commits: 1cbb9282ad842c48fff8a86e121ce7e33f6ca4a3 wpt-pr: 9966 wpt-commits: 1cbb9282ad842c48fff8a86e121ce7e33f6ca4a3 wpt-pr: 9966 UltraBlame original commit: 7b6feb16ae6fe5ee0889b819b649b2b41e003893
… unsupported scheme is ignored, a=testonly Automatic 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 specified wpt-commits: 1cbb9282ad842c48fff8a86e121ce7e33f6ca4a3 wpt-pr: 9966 wpt-commits: 1cbb9282ad842c48fff8a86e121ce7e33f6ca4a3 wpt-pr: 9966 UltraBlame original commit: 7b6feb16ae6fe5ee0889b819b649b2b41e003893
… unsupported scheme is ignored, a=testonly Automatic 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 specified wpt-commits: 1cbb9282ad842c48fff8a86e121ce7e33f6ca4a3 wpt-pr: 9966 wpt-commits: 1cbb9282ad842c48fff8a86e121ce7e33f6ca4a3 wpt-pr: 9966 UltraBlame original commit: 7b6feb16ae6fe5ee0889b819b649b2b41e003893
This PR addresses #446.
Preview | Diff