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

Unified Diff: LayoutTests/fast/dom/register-protocol-handler.html

Issue 22791007: Improve SecurityError message on verifyProtocolHandlerScheme() (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 4 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/register-protocol-handler-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/fast/dom/register-protocol-handler.html
diff --git a/LayoutTests/fast/dom/register-protocol-handler.html b/LayoutTests/fast/dom/register-protocol-handler.html
index edd02f9aad6df55e27529fd4da22acd8d579de94..6b9c5cb0aba64aaf7055be17aec37356a7008013 100644
--- a/LayoutTests/fast/dom/register-protocol-handler.html
+++ b/LayoutTests/fast/dom/register-protocol-handler.html
@@ -20,15 +20,17 @@ else
var invalid_protocols = ['http', 'https', 'file', 'web+'];
invalid_protocols.forEach(function (protocol) {
var succeeded = false;
+ var errorMessage;
try {
window.navigator.registerProtocolHandler(protocol, "invalid protocol %s", "title");
} catch (e) {
succeeded = 'SecurityError' == e.name;
+ errorMessage = e.message;
}
- if (succeeded)
- debug('Pass: Invalid protocol "' + protocol + '" threw SecurityError exception.');
- else
+ if (succeeded) {
+ debug('Pass: Invalid protocol "' + protocol + '" threw SecurityError exception: "' + errorMessage + '".');
+ }else
debug('Fail: Invalid protocol "' + protocol + '" allowed.');
});
« no previous file with comments | « no previous file | LayoutTests/fast/dom/register-protocol-handler-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698