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..42bc83a9d7a0ea0bf6fb103654db579c19d01ead 100644 |
--- a/LayoutTests/fast/dom/navigatorcontentutils/is-protocol-handler-registered.html |
+++ b/LayoutTests/fast/dom/navigatorcontentutils/is-protocol-handler-registered.html |
@@ -32,15 +32,16 @@ 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'); |
+ window.navigator.isProtocolHandlerRegistered(scheme, 'invalid scheme uri=%s'); |
} catch (e) { |
- succeeded = true; |
+ succeeded = 'SyntaxError' == e.name; |
+ errorMessage = e.message; |
} |
if (succeeded) |
debug('PASS Invalid scheme "' + scheme + '" falied.'); |
else |
- debug('FAIL Invalid scheme "' + scheme + '" allowed.'); |
+ debug('FAIL Invalid scheme "' + scheme + '" allowed. Threw exception: "' + errorMessage + '".'); |
}); |
// FIXME: Need to check if this function can return 'registered' and 'declined' states as well. |