Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(44)

Unified Diff: LayoutTests/fast/dom/navigatorcontentutils/is-protocol-handler-registered.html

Issue 298273008: Improve scheme validation check in NavigatorContentUtils (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | LayoutTests/fast/dom/navigatorcontentutils/is-protocol-handler-registered-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/fast/dom/navigatorcontentutils/is-protocol-handler-registered.html
diff --git a/LayoutTests/fast/dom/navigatorcontentutils/is-protocol-handler-registered.html b/LayoutTests/fast/dom/navigatorcontentutils/is-protocol-handler-registered.html
index dab41fb86d021d898ebae7ad6fe3a3c5f40bdc9f..6e2e53d44e81cf4441b0c185e17a2a0a55b74fff 100644
--- a/LayoutTests/fast/dom/navigatorcontentutils/is-protocol-handler-registered.html
+++ b/LayoutTests/fast/dom/navigatorcontentutils/is-protocol-handler-registered.html
@@ -28,21 +28,6 @@ if (succeeded)
else
debug('FAIL Invalid url "' + invalidUrl + '" allowed.');
-var invalid_schemes = ['mailto:', 'ssh:/', 'magnet:+', 'tel:sip'];
haraken 2014/05/29 04:20:09 You removed these tests, but do we already have an
gyuyoung-inactive 2014/05/29 05:01:36 Oh, my mistake. isProtocolHandlerRegistered() also
-invalid_schemes.forEach(function (scheme) {
- var succeeded = false;
- try {
- window.navigator.registerProtocolHandler(scheme, 'invalid scheme uri=%s', 'title');
- } catch (e) {
- succeeded = true;
- }
-
- if (succeeded)
- debug('PASS Invalid scheme "' + scheme + '" falied.');
- else
- debug('FAIL Invalid scheme "' + scheme + '" allowed.');
-});
-
// FIXME: Need to check if this function can return 'registered' and 'declined' states as well.
try {
var state = window.navigator.isProtocolHandlerRegistered("bitcoin", "valid protocol %s");
« no previous file with comments | « no previous file | LayoutTests/fast/dom/navigatorcontentutils/is-protocol-handler-registered-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698