[Webkit-unassigned] [Bug 29651] [HTML5] Add a way for an application to register as a protocol handler.
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Tue Nov 3 10:22:33 PST 2009
https://bugs.webkit.org/show_bug.cgi?id=29651
Dmitry Titov <dimich at chromium.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #42270|review? |review+, commit-queue-
Flag| |
--- Comment #28 from Dmitry Titov <dimich at chromium.org> 2009-11-03 10:22:32 PDT ---
(From update of attachment 42270)
> Index: WebCore/page/Navigator.cpp
> Index: LayoutTests/fast/dom/navigator-detached-no-crash.html
> + } catch(err) {
> + // navigator.registerXXX will throw on invalid input.
> + strings.push("navigator."+p+"() threw err "+err);
I'd change comment to explicitly indicate that exception is an expected result
here.
> Index: LayoutTests/fast/dom/registerContentHandler.html
> + var succeeded = false;
> + try {
> + window.navigator.registerContentHandler(protocol, "invalid protocol %s", "title");
> + } catch(e) {
> + if('SECURITY_ERR' == e.name) {
> + succeeded = true;
> + };
> + };
> +
> + if(succeeded == true) {
> + debug('Pass: Invalid protocol "' + protocol + '" threw SECURITY_ERR exception.');
> + } else {
> + debug('Fail: Invalid protocol "' + protocol + '" allowed.');
> + };
I think by removal of a 'succeeded' the test could be smaller and more
readable.
> +if(succeeded == true) {
> + debug('Pass: Valid call succeeded.');
> +} else {
> + debug('Fail: Invalid call did not succeed.');
typo, should be "Fail: Valid call did not succeed."
Overall looks good. r=me.
I'll make the changes above on landing.
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list