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

Unified Diff: LayoutTests/fast/dom/navigatorcontentutils/register-protocol-handler.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
Index: LayoutTests/fast/dom/navigatorcontentutils/register-protocol-handler.html
diff --git a/LayoutTests/fast/dom/navigatorcontentutils/register-protocol-handler.html b/LayoutTests/fast/dom/navigatorcontentutils/register-protocol-handler.html
index 731beb73973b2ff5c73bc1c93aec1493e2cf7229..83b3421667e9ef7a4383135162d141b355c5e329 100644
--- a/LayoutTests/fast/dom/navigatorcontentutils/register-protocol-handler.html
+++ b/LayoutTests/fast/dom/navigatorcontentutils/register-protocol-handler.html
@@ -56,13 +56,14 @@ invalid_schemes.forEach(function (scheme) {
try {
window.navigator.registerProtocolHandler(scheme, 'invalid scheme uri=%s', 'title');
} 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 + '".');
});
var invalid_urls = ["", "%S"];

Powered by Google App Engine
This is Rietveld 408576698