Index: LayoutTests/fast/dom/navigatorcontentutils/unregister-protocol-handler.html |
diff --git a/LayoutTests/fast/dom/navigatorcontentutils/unregister-protocol-handler.html b/LayoutTests/fast/dom/navigatorcontentutils/unregister-protocol-handler.html |
index 301cf59fca7b3ceee19279be6d07351f3b5ad745..c56a2d6eeebaea225cbccb6e5b1310ce97543e2e 100644 |
--- a/LayoutTests/fast/dom/navigatorcontentutils/unregister-protocol-handler.html |
+++ b/LayoutTests/fast/dom/navigatorcontentutils/unregister-protocol-handler.html |
@@ -49,6 +49,21 @@ valid_protocols.forEach(function (protocol) { |
debug('Fail: Valid protocol "' + protocol + '" failed.'); |
}); |
+var invalid_schemes = ['mailto:', 'ssh:/', 'magnet:+', 'tel:sip']; |
+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.'); |
+}); |
+ |
var invalid_urls = ["", "%S"]; |
invalid_urls.forEach(function (url) { |
var succeeded = false; |