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

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

Issue 130823002: Fix *Fail* tests in unregisterProtocolHandler test (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 11 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/unregister-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/unregister-protocol-handler.html
diff --git a/LayoutTests/fast/dom/unregister-protocol-handler.html b/LayoutTests/fast/dom/unregister-protocol-handler.html
index 609726662a994ec463aa715a7490d7701aa4321a..301cf59fca7b3ceee19279be6d07351f3b5ad745 100644
--- a/LayoutTests/fast/dom/unregister-protocol-handler.html
+++ b/LayoutTests/fast/dom/unregister-protocol-handler.html
@@ -24,10 +24,11 @@ invalid_protocols.forEach(function (protocol) {
window.navigator.unregisterProtocolHandler(protocol, "invalid protocol %s", "title");
} catch (e) {
succeeded = 'SecurityError' == e.name;
+ errorMessage = e.message;
}
if (succeeded)
- debug('Pass: Invalid protocol "' + protocol + '" threw SecurityError exception.');
+ debug('Pass: Invalid protocol "' + protocol + '" threw SecurityError exception: "' + errorMessage + '".');
else
debug('Fail: Invalid protocol "' + protocol + '" allowed.');
});
@@ -54,11 +55,12 @@ invalid_urls.forEach(function (url) {
try {
window.navigator.unregisterProtocolHandler('web+myprotocol', url, 'title');
} catch (e) {
- succeeded = 'SYNTAX_ERR' == e.name;
+ succeeded = 'SyntaxError' == e.name;
+ errorMessage = e.message;
}
if (succeeded)
- debug('Pass: Invalid url "' + url + '" threw SYNTAX_ERR exception.');
+ debug('Pass: Invalid url "' + url + '" threw SyntaxError exception.' + errorMessage + '".');
else
debug('Fail: Invalid url "' + url + '" allowed.');
});
« no previous file with comments | « no previous file | LayoutTests/fast/dom/unregister-protocol-handler-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698